summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/storage_interface_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/storage_interface_impl.cpp')
-rw-r--r--src/mongo/db/repl/storage_interface_impl.cpp42
1 files changed, 17 insertions, 25 deletions
diff --git a/src/mongo/db/repl/storage_interface_impl.cpp b/src/mongo/db/repl/storage_interface_impl.cpp
index 39d5c73b6e4..19e7c8840fa 100644
--- a/src/mongo/db/repl/storage_interface_impl.cpp
+++ b/src/mongo/db/repl/storage_interface_impl.cpp
@@ -501,20 +501,16 @@ Status StorageInterfaceImpl::renameCollection(OperationContext* opCtx,
if (fromNS.db() != toNS.db()) {
return Status(ErrorCodes::InvalidNamespace,
str::stream() << "Cannot rename collection between databases. From NS: "
- << fromNS.ns()
- << "; to NS: "
- << toNS.ns());
+ << fromNS.ns() << "; to NS: " << toNS.ns());
}
return writeConflictRetry(opCtx, "StorageInterfaceImpl::renameCollection", fromNS.ns(), [&] {
AutoGetDb autoDB(opCtx, fromNS.db(), MODE_X);
if (!autoDB.getDb()) {
return Status(ErrorCodes::NamespaceNotFound,
- str::stream() << "Cannot rename collection from " << fromNS.ns() << " to "
- << toNS.ns()
- << ". Database "
- << fromNS.db()
- << " not found.");
+ str::stream()
+ << "Cannot rename collection from " << fromNS.ns() << " to "
+ << toNS.ns() << ". Database " << fromNS.db() << " not found.");
}
WriteUnitOfWork wunit(opCtx);
const auto status = autoDB.getDb()->renameCollection(opCtx, fromNS, toNS, stayTemp);
@@ -557,8 +553,7 @@ Status StorageInterfaceImpl::setIndexIsMultikey(OperationContext* opCtx,
if (!idx) {
return Status(ErrorCodes::IndexNotFound,
str::stream() << "Could not find index " << indexName << " in "
- << nss.ns()
- << " to set to multikey.");
+ << nss.ns() << " to set to multikey.");
}
collection->getIndexCatalog()->setMultikeyPaths(opCtx, idx, paths);
wunit.commit();
@@ -646,16 +641,13 @@ StatusWith<std::vector<BSONObj>> _findOrDeleteDocuments(
if (!indexDescriptor) {
return Result(ErrorCodes::IndexNotFound,
str::stream() << "Index not found, ns:" << nsOrUUID.toString()
- << ", index: "
- << *indexName);
+ << ", index: " << *indexName);
}
if (indexDescriptor->isPartial()) {
return Result(ErrorCodes::IndexOptionsConflict,
str::stream()
<< "Partial index is not allowed for this operation, ns:"
- << nsOrUUID.toString()
- << ", index: "
- << *indexName);
+ << nsOrUUID.toString() << ", index: " << *indexName);
}
KeyPattern keyPattern(indexDescriptor->keyPattern());
@@ -855,11 +847,11 @@ Status _updateWithQuery(OperationContext* opCtx,
}
AutoGetCollection autoColl(opCtx, nss, MODE_IX);
- auto collectionResult = getCollection(
- autoColl,
- nss,
- str::stream() << "Unable to update documents in " << nss.ns() << " using query "
- << request.getQuery());
+ auto collectionResult =
+ getCollection(autoColl,
+ nss,
+ str::stream() << "Unable to update documents in " << nss.ns()
+ << " using query " << request.getQuery());
if (!collectionResult.isOK()) {
return collectionResult.getStatus();
}
@@ -988,11 +980,11 @@ Status StorageInterfaceImpl::deleteByFilter(OperationContext* opCtx,
}
AutoGetCollection autoColl(opCtx, nss, MODE_IX);
- auto collectionResult = getCollection(
- autoColl,
- nss,
- str::stream() << "Unable to delete documents in " << nss.ns() << " using filter "
- << filter);
+ auto collectionResult =
+ getCollection(autoColl,
+ nss,
+ str::stream() << "Unable to delete documents in " << nss.ns()
+ << " using filter " << filter);
if (!collectionResult.isOK()) {
return collectionResult.getStatus();
}