summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2015-02-02 13:45:53 -0500
committerRamon Fernandez <ramon.fernandez@mongodb.com>2015-02-04 13:47:46 -0500
commitb4cb950bc48ad3bfe107befa1bc9fed665c98b45 (patch)
tree86ba21534a93329b6b9e6bb9f020cb1090e6d824
parent6f50ace8c8a57d34490965291cd5638ee4554c03 (diff)
downloadmongo-b4cb950bc48ad3bfe107befa1bc9fed665c98b45.tar.gz
SERVER-17132 Update and Delete stages need to forceFetchAllLocs after saveState
(cherry picked from commit 87f1334585928a2b86407f68ecb6b35c62855b24)
-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;