summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergi Mateo Bellido <sergi.mateo-bellido@mongodb.com>2023-05-11 14:21:01 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-11 15:19:44 +0000
commitdcd8c050fb807cd6a30f1c3f833f4be23c22fdcf (patch)
tree872a9fcb4b42145ca381183c51fea5385dfe0088 /src
parentbb7468fd0c2f7f2e3bdd4561d2c906f9ebb007ab (diff)
downloadmongo-dcd8c050fb807cd6a30f1c3f833f4be23c22fdcf.tar.gz
SERVER-74980 Reducing CatalogCache verbosity
Diffstat (limited to 'src')
-rw-r--r--src/mongo/s/catalog_cache.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mongo/s/catalog_cache.cpp b/src/mongo/s/catalog_cache.cpp
index 97b2930b693..226140aab4d 100644
--- a/src/mongo/s/catalog_cache.cpp
+++ b/src/mongo/s/catalog_cache.cpp
@@ -875,7 +875,7 @@ CatalogCache::CollectionCache::LookupResult CatalogCache::CollectionCache::_look
OperationContext* opCtx,
const NamespaceString& nss,
const RoutingTableHistoryValueHandle& existingHistory,
- const ComparableChunkVersion& previousVersion) {
+ const ComparableChunkVersion& timeInStore) {
const bool isIncremental(existingHistory && existingHistory->optRt);
_updateRefreshesStats(isIncremental, true);
blockCollectionCacheLookup.pauseWhileSet(opCtx);
@@ -894,7 +894,7 @@ CatalogCache::CollectionCache::LookupResult CatalogCache::CollectionCache::_look
"Refreshing cached collection",
logAttrs(nss),
"lookupSinceVersion"_attr = lookupVersion,
- "timeInStore"_attr = previousVersion);
+ "timeInStore"_attr = timeInStore);
auto collectionAndChunks = _catalogCacheLoader.getChunksSince(nss, lookupVersion).get();
@@ -916,14 +916,17 @@ CatalogCache::CollectionCache::LookupResult CatalogCache::CollectionCache::_look
const ChunkVersion newVersion = newRoutingHistory->getVersion();
newComparableVersion.setChunkVersion(newVersion);
- LOGV2_FOR_CATALOG_REFRESH(4619901,
- isIncremental || newComparableVersion != previousVersion ? 0 : 1,
- "Refreshed cached collection",
- logAttrs(nss),
- "lookupSinceVersion"_attr = lookupVersion,
- "newVersion"_attr = newComparableVersion,
- "timeInStore"_attr = previousVersion,
- "duration"_attr = Milliseconds(t.millis()));
+ // The log below is logged at debug(0) (equivalent to info level) only if the new placement
+ // version is different than the one we already had (if any).
+ LOGV2_FOR_CATALOG_REFRESH(
+ 4619901,
+ (!isIncremental || newVersion != existingHistory->optRt->getVersion()) ? 0 : 1,
+ "Refreshed cached collection",
+ logAttrs(nss),
+ "lookupSinceVersion"_attr = lookupVersion,
+ "newVersion"_attr = newComparableVersion,
+ "timeInStore"_attr = timeInStore,
+ "duration"_attr = Milliseconds(t.millis()));
_updateRefreshesStats(isIncremental, false);
return LookupResult(OptionalRoutingTableHistory(std::move(newRoutingHistory)),