diff options
Diffstat (limited to 'src/mongo/db/catalog/capped_utils.cpp')
-rw-r--r-- | src/mongo/db/catalog/capped_utils.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mongo/db/catalog/capped_utils.cpp b/src/mongo/db/catalog/capped_utils.cpp index c7ceead85a0..89d3719d095 100644 --- a/src/mongo/db/catalog/capped_utils.cpp +++ b/src/mongo/db/catalog/capped_utils.cpp @@ -64,8 +64,8 @@ Status emptyCapped(OperationContext* opCtx, const NamespaceString& collectionNam if (userInitiatedWritesAndNotPrimary) { return Status(ErrorCodes::NotMaster, - str::stream() << "Not primary while truncating collection: " - << collectionName); + str::stream() + << "Not primary while truncating collection: " << collectionName); } Database* db = autoDb.getDb(); @@ -86,8 +86,8 @@ Status emptyCapped(OperationContext* opCtx, const NamespaceString& collectionNam repl::ReplicationCoordinator::modeNone) && collectionName.isOplog()) { return Status(ErrorCodes::OplogOperationUnsupported, - str::stream() << "Cannot truncate a live oplog while replicating: " - << collectionName); + str::stream() + << "Cannot truncate a live oplog while replicating: " << collectionName); } BackgroundOperation::assertNoBgOpInProgForNs(collectionName.ns()); @@ -134,8 +134,7 @@ void cloneCollectionAsCapped(OperationContext* opCtx, uassert(ErrorCodes::NamespaceExists, str::stream() << "cloneCollectionAsCapped failed - destination collection " << toNss - << " already exists. source collection: " - << fromNss, + << " already exists. source collection: " << fromNss, !db->getCollection(opCtx, toNss)); // create new collection @@ -263,8 +262,7 @@ void convertToCapped(OperationContext* opCtx, uassertStatusOKWithContext(tmpNameResult, str::stream() << "Cannot generate temporary collection namespace to convert " - << collectionName - << " to a capped collection"); + << collectionName << " to a capped collection"); const auto& longTmpName = tmpNameResult.getValue(); const auto shortTmpName = longTmpName.coll().toString(); |