summaryrefslogtreecommitdiff
path: root/src/mongo/s/catalog_cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/catalog_cache.cpp')
-rw-r--r--src/mongo/s/catalog_cache.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mongo/s/catalog_cache.cpp b/src/mongo/s/catalog_cache.cpp
index e4a151f9ccc..c2206848332 100644
--- a/src/mongo/s/catalog_cache.cpp
+++ b/src/mongo/s/catalog_cache.cpp
@@ -373,8 +373,7 @@ void CatalogCache::checkEpochOrThrow(const NamespaceString& nss,
const auto itDb = _collectionsByDb.find(nss.db());
uassert(StaleConfigInfo(nss, targetCollectionVersion, boost::none),
str::stream() << "could not act as router for " << nss.ns()
- << ", no entry for database "
- << nss.db(),
+ << ", no entry for database " << nss.db(),
itDb != _collectionsByDb.end());
auto itColl = itDb->second.find(nss.ns());
@@ -392,8 +391,7 @@ void CatalogCache::checkEpochOrThrow(const NamespaceString& nss,
auto foundVersion = itColl->second->routingInfo->getVersion();
uassert(StaleConfigInfo(nss, targetCollectionVersion, foundVersion),
str::stream() << "could not act as router for " << nss.ns() << ", wanted "
- << targetCollectionVersion.toString()
- << ", but found "
+ << targetCollectionVersion.toString() << ", but found "
<< foundVersion.toString(),
foundVersion.epoch() == targetCollectionVersion.epoch());
}
@@ -467,8 +465,8 @@ void CatalogCache::report(BSONObjBuilder* builder) const {
void CatalogCache::_scheduleDatabaseRefresh(WithLock lk,
const std::string& dbName,
std::shared_ptr<DatabaseInfoEntry> dbEntry) {
- const auto onRefreshCompleted =
- [ this, t = Timer(), dbName, dbEntry ](const StatusWith<DatabaseType>& swDbt) {
+ const auto onRefreshCompleted = [this, t = Timer(), dbName, dbEntry](
+ const StatusWith<DatabaseType>& swDbt) {
// TODO (SERVER-34164): Track and increment stats for database refreshes.
if (!swDbt.isOK()) {
LOG_CATALOG_REFRESH(0) << "Refresh for database " << dbName << " took " << t.millis()
@@ -556,8 +554,9 @@ void CatalogCache::_scheduleCollectionRefresh(WithLock lk,
}
// Invoked when one iteration of getChunksSince has completed, whether with success or error
- const auto onRefreshCompleted = [ this, t = Timer(), nss, isIncremental, existingRoutingInfo ](
- const Status& status, RoutingTableHistory* routingInfoAfterRefresh) {
+ const auto onRefreshCompleted = [this, t = Timer(), nss, isIncremental, existingRoutingInfo](
+ const Status& status,
+ RoutingTableHistory* routingInfoAfterRefresh) {
if (isIncremental) {
_stats.numActiveIncrementalRefreshes.subtractAndFetch(1);
} else {
@@ -570,9 +569,10 @@ void CatalogCache::_scheduleCollectionRefresh(WithLock lk,
LOG_CATALOG_REFRESH(0) << "Refresh for collection " << nss << " took " << t.millis()
<< " ms and failed" << causedBy(redact(status));
} else if (routingInfoAfterRefresh) {
- const int logLevel = (!existingRoutingInfo || (existingRoutingInfo &&
- routingInfoAfterRefresh->getVersion() !=
- existingRoutingInfo->getVersion()))
+ const int logLevel =
+ (!existingRoutingInfo ||
+ (existingRoutingInfo &&
+ routingInfoAfterRefresh->getVersion() != existingRoutingInfo->getVersion()))
? 0
: 1;
LOG_CATALOG_REFRESH(logLevel)