summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/find_and_modify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/find_and_modify.cpp')
-rw-r--r--src/mongo/db/commands/find_and_modify.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/commands/find_and_modify.cpp b/src/mongo/db/commands/find_and_modify.cpp
index f944274c695..161e44d6dbd 100644
--- a/src/mongo/db/commands/find_and_modify.cpp
+++ b/src/mongo/db/commands/find_and_modify.cpp
@@ -203,7 +203,7 @@ void recordStatsForTopCommand(OperationContext* opCtx) {
curOp->getReadWriteType());
}
-void checkIfTransactionOnCappedColl(Collection* coll, bool inTransaction) {
+void checkIfTransactionOnCappedColl(const Collection* coll, bool inTransaction) {
if (coll && coll->isCapped()) {
uassert(
ErrorCodes::OperationNotSupportedInTransaction,
@@ -285,7 +285,7 @@ public:
CollectionShardingState::get(opCtx, nsString)->checkShardVersionOrThrow(opCtx);
- Collection* const collection = autoColl.getCollection();
+ const Collection* const collection = autoColl.getCollection();
const auto exec =
uassertStatusOK(getExecutorDelete(opDebug, collection, &parsedDelete, verbosity));
@@ -310,7 +310,7 @@ public:
CollectionShardingState::get(opCtx, nsString)->checkShardVersionOrThrow(opCtx);
- Collection* const collection = autoColl.getCollection();
+ const Collection* const collection = autoColl.getCollection();
const auto exec =
uassertStatusOK(getExecutorUpdate(opDebug, collection, &parsedUpdate, verbosity));
@@ -468,7 +468,7 @@ public:
assertCanWrite(opCtx, nsString);
- Collection* const collection = autoColl.getCollection();
+ const Collection* const collection = autoColl.getCollection();
checkIfTransactionOnCappedColl(collection, inTransaction);
const auto exec = uassertStatusOK(
@@ -524,7 +524,7 @@ public:
assertCanWrite(opCtx, nsString);
- Collection* collection = autoColl.getCollection();
+ const Collection* collection = autoColl.getCollection();
// Create the collection if it does not exist when performing an upsert because the
// update stage does not create its own collection