diff options
Diffstat (limited to 'src/mongo/db/s/split_chunk.cpp')
-rw-r--r-- | src/mongo/db/s/split_chunk.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mongo/db/s/split_chunk.cpp b/src/mongo/db/s/split_chunk.cpp index be2560efcee..ec8d3e9b530 100644 --- a/src/mongo/db/s/split_chunk.cpp +++ b/src/mongo/db/s/split_chunk.cpp @@ -137,15 +137,14 @@ StatusWith<boost::optional<ChunkRange>> splitChunk(OperationContext* opCtx, // // TODO(SERVER-25086): Remove distLock acquisition from split chunk // - const std::string whyMessage( - str::stream() << "splitting chunk " << chunkRange.toString() << " in " << nss.toString()); + const std::string whyMessage(str::stream() << "splitting chunk " << chunkRange.toString() + << " in " << nss.toString()); auto scopedDistLock = Grid::get(opCtx)->catalogClient()->getDistLockManager()->lock( opCtx, nss.ns(), whyMessage, DistLockManager::kDefaultLockTimeout); if (!scopedDistLock.isOK()) { return scopedDistLock.getStatus().withContext( str::stream() << "could not acquire collection lock for " << nss.toString() - << " to split chunk " - << chunkRange.toString()); + << " to split chunk " << chunkRange.toString()); } // If the shard key is hashed, then we must make sure that the split points are of type @@ -157,12 +156,11 @@ StatusWith<boost::optional<ChunkRange>> splitChunk(OperationContext* opCtx, BSONElement splitKeyElement = it.next(); if (splitKeyElement.type() != NumberLong) { return {ErrorCodes::CannotSplit, - str::stream() << "splitChunk cannot split chunk " - << chunkRange.toString() - << ", split point " - << splitKeyElement.toString() - << " must be of type " - "NumberLong for hashed shard key patterns"}; + str::stream() + << "splitChunk cannot split chunk " << chunkRange.toString() + << ", split point " << splitKeyElement.toString() + << " must be of type " + "NumberLong for hashed shard key patterns"}; } } } |