summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2015-02-02 13:45:53 -0500
committerMathias Stearn <mathias@10gen.com>2015-02-02 14:17:55 -0500
commit87f1334585928a2b86407f68ecb6b35c62855b24 (patch)
tree0c89625967930ca8ae3221ce1d0fd1f939330661
parent51ae76922e18a097e4ec89aa0a65a1d6a9a51cef (diff)
downloadmongo-87f1334585928a2b86407f68ecb6b35c62855b24.tar.gz
SERVER-17132 Update and Delete stages need to forceFetchAllLocs after saveState
-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;