summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/exec/delete.cpp5
-rw-r--r--src/mongo/db/exec/update.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/exec/delete.cpp b/src/mongo/db/exec/delete.cpp
index a35413b1c5a..12ae932edbb 100644
--- a/src/mongo/db/exec/delete.cpp
+++ b/src/mongo/db/exec/delete.cpp
@@ -116,6 +116,11 @@ namespace mongo {
// TODO: Do we want to buffer docs and delete them in a group rather than
// saving/restoring state repeatedly?
_child->saveState();
+ if (supportsDocLocking()) {
+ // Doc-locking engines require this after saveState() since they don't use
+ // invalidations.
+ WorkingSetCommon::forceFetchAllLocs(_txn, _ws, _collection);
+ }
{
WriteUnitOfWork wunit(_txn);
diff --git a/src/mongo/db/exec/update.cpp b/src/mongo/db/exec/update.cpp
index 63ba241c644..ff092d0deb3 100644
--- a/src/mongo/db/exec/update.cpp
+++ b/src/mongo/db/exec/update.cpp
@@ -817,6 +817,11 @@ namespace mongo {
// Save state before making changes
_child->saveState();
+ if (supportsDocLocking()) {
+ // Doc-locking engines require this after saveState() since they don't use
+ // invalidations.
+ WorkingSetCommon::forceFetchAllLocs(_txn, _ws, _collection);
+ }
// Do the update and return.
BSONObj reFetched;