diff options
Diffstat (limited to 'src/mongo/db/s/config/configsvr_shard_collection_command.cpp')
-rw-r--r-- | src/mongo/db/s/config/configsvr_shard_collection_command.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp index e53552916d8..216d3bbaa2c 100644 --- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp @@ -99,8 +99,7 @@ void validateAndDeduceFullRequestOptions(OperationContext* opCtx, CollatorFactoryInterface::get(opCtx->getServiceContext())->makeFromBSON(collation)); uassert(ErrorCodes::BadValue, str::stream() << "The collation for shardCollection must be {locale: 'simple'}, " - << "but found: " - << collation, + << "but found: " << collation, !collator); simpleCollationSpecified = true; } @@ -114,8 +113,7 @@ void validateAndDeduceFullRequestOptions(OperationContext* opCtx, int numChunks = request->getNumInitialChunks(); uassert(ErrorCodes::InvalidOptions, str::stream() << "numInitialChunks cannot be more than either: " - << maxNumInitialChunksForShards - << ", 8192 * number of shards; or " + << maxNumInitialChunksForShards << ", 8192 * number of shards; or " << maxNumInitialChunksTotal, numChunks >= 0 && numChunks <= maxNumInitialChunksForShards && numChunks <= maxNumInitialChunksTotal); @@ -208,9 +206,7 @@ void migrateAndFurtherSplitInitialChunks(OperationContext* opCtx, auto chunkManager = routingInfo.cm(); // Move and commit each "big chunk" to a different shard. - auto nextShardId = [&, indx = 0 ]() mutable { - return shardIds[indx++ % shardIds.size()]; - }; + auto nextShardId = [&, indx = 0]() mutable { return shardIds[indx++ % shardIds.size()]; }; for (auto chunk : chunkManager->chunks()) { const auto shardId = nextShardId(); @@ -323,10 +319,7 @@ boost::optional<UUID> getUUIDFromPrimaryShard(OperationContext* opCtx, uassert(ErrorCodes::InternalError, str::stream() << "expected the primary shard host " << primaryShard->getConnString() - << " for database " - << nss.db() - << " to return an entry for " - << nss.ns() + << " for database " << nss.db() << " to return an entry for " << nss.ns() << " in its listCollections response, but it did not", !res.isEmpty()); @@ -338,15 +331,12 @@ boost::optional<UUID> getUUIDFromPrimaryShard(OperationContext* opCtx, uassert(ErrorCodes::InternalError, str::stream() << "expected primary shard to return 'info' field as part of " "listCollections for " - << nss.ns() - << ", but got " - << res, + << nss.ns() << ", but got " << res, !collectionInfo.isEmpty()); uassert(ErrorCodes::InternalError, str::stream() << "expected primary shard to return a UUID for collection " << nss.ns() - << " as part of 'info' field but got " - << res, + << " as part of 'info' field but got " << res, collectionInfo.hasField("uuid")); return uassertStatusOK(UUID::parse(collectionInfo["uuid"])); @@ -576,8 +566,7 @@ public: if (fromMapReduce) { uassert(ErrorCodes::ConflictingOperationInProgress, str::stream() << "Map reduce with sharded output to a new collection found " - << nss.ns() - << " to be non-empty which is not supported.", + << nss.ns() << " to be non-empty which is not supported.", isEmpty); } |