summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2020-09-30 11:19:31 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-10-13 00:32:43 +0000
commitbcab0c7e1c1b2e1516d06d23233fea9a425b99f7 (patch)
tree8d805048d69ece52bb64e740532f5968b671865c /src/mongo/db/ops
parent0dadef8dd93175bf3a75412d8a32b377d9eba42c (diff)
downloadmongo-bcab0c7e1c1b2e1516d06d23233fea9a425b99f7.tar.gz
SERVER-51200 CollectionPtr in RequiresCollectionStage point to instance owned by AutoGetCollection
RequiresCollectionStage now holds a pointer to CollectionPtr owned by an AutoGetCollection. When we save and restore the executor a new CollectionPtr pointer needs to be assigned. Plan executors can no longer be created with temporary CollectionPtr instances and their interface have been changed to take pointers to avoid binding to rvalues. RequiresCollectionStage no longer loads collections from the catalog and will be in sync with the owning AutoGetCollection.
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r--src/mongo/db/ops/delete.cpp2
-rw-r--r--src/mongo/db/ops/update.cpp2
-rw-r--r--src/mongo/db/ops/write_ops_exec.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/ops/delete.cpp b/src/mongo/db/ops/delete.cpp
index a546a57ea76..5bc4f83b19b 100644
--- a/src/mongo/db/ops/delete.cpp
+++ b/src/mongo/db/ops/delete.cpp
@@ -58,7 +58,7 @@ long long deleteObjects(OperationContext* opCtx,
uassertStatusOK(parsedDelete.parseRequest());
auto exec = uassertStatusOK(getExecutorDelete(
- &CurOp::get(opCtx)->debug(), collection, &parsedDelete, boost::none /* verbosity */));
+ &CurOp::get(opCtx)->debug(), &collection, &parsedDelete, boost::none /* verbosity */));
return exec->executeDelete();
}
diff --git a/src/mongo/db/ops/update.cpp b/src/mongo/db/ops/update.cpp
index 899dbac9713..455afeadbf9 100644
--- a/src/mongo/db/ops/update.cpp
+++ b/src/mongo/db/ops/update.cpp
@@ -93,7 +93,7 @@ UpdateResult update(OperationContext* opCtx, Database* db, const UpdateRequest&
OpDebug* const nullOpDebug = nullptr;
auto exec = uassertStatusOK(
- getExecutorUpdate(nullOpDebug, collection, &parsedUpdate, boost::none /* verbosity */));
+ getExecutorUpdate(nullOpDebug, &collection, &parsedUpdate, boost::none /* verbosity */));
return exec->executeUpdate();
}
diff --git a/src/mongo/db/ops/write_ops_exec.cpp b/src/mongo/db/ops/write_ops_exec.cpp
index 981f1a542a4..22d6c9e29cb 100644
--- a/src/mongo/db/ops/write_ops_exec.cpp
+++ b/src/mongo/db/ops/write_ops_exec.cpp
@@ -666,7 +666,7 @@ static SingleWriteResult performSingleUpdateOp(OperationContext* opCtx,
assertCanWrite_inlock(opCtx, ns);
auto exec = uassertStatusOK(getExecutorUpdate(
- &curOp.debug(), collection->getCollection(), &parsedUpdate, boost::none /* verbosity */));
+ &curOp.debug(), &collection->getCollection(), &parsedUpdate, boost::none /* verbosity */));
{
stdx::lock_guard<Client> lk(*opCtx->getClient());
@@ -905,7 +905,7 @@ static SingleWriteResult performSingleDeleteOp(OperationContext* opCtx,
&hangWithLockDuringBatchRemove, opCtx, "hangWithLockDuringBatchRemove");
auto exec = uassertStatusOK(getExecutorDelete(
- &curOp.debug(), collection.getCollection(), &parsedDelete, boost::none /* verbosity */));
+ &curOp.debug(), &collection.getCollection(), &parsedDelete, boost::none /* verbosity */));
{
stdx::lock_guard<Client> lk(*opCtx->getClient());