diff options
author | Martin Neupauer <martin.neupauer@mongodb.com> | 2019-08-29 13:22:09 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-08-29 13:22:09 +0000 |
commit | 3cdbdedce431fbc71a5eb89b689268e783d73bd4 (patch) | |
tree | 327109bb734c91384f13f5acee6b71c917ea1fd3 /src/mongo/db/exec/delete.cpp | |
parent | ffd486c3ff049abc9f8a2c76b3e2b9dea970c19b (diff) | |
download | mongo-3cdbdedce431fbc71a5eb89b689268e783d73bd4.tar.gz |
SERVER-42181 Make WorkingSetMember hold Document instead of BSONObj
SERVER-42157 Unowned mode for Document/Value
Diffstat (limited to 'src/mongo/db/exec/delete.cpp')
-rw-r--r-- | src/mongo/db/exec/delete.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/exec/delete.cpp b/src/mongo/db/exec/delete.cpp index 5bfc34510d7..c31ce92b72d 100644 --- a/src/mongo/db/exec/delete.cpp +++ b/src/mongo/db/exec/delete.cpp @@ -183,12 +183,11 @@ PlanStage::StageState DeleteStage::doWork(WorkingSetID* out) { if (_params->returnDeleted) { // Save a copy of the document that is about to get deleted, but keep it in the RID_AND_OBJ // state in case we need to retry deleting it. - BSONObj deletedDoc = member->obj.value(); - member->obj.setValue(deletedDoc.getOwned()); + member->makeObjOwnedIfNeeded(); } if (_params->removeSaver) { - uassertStatusOK(_params->removeSaver->goingToDelete(member->obj.value())); + uassertStatusOK(_params->removeSaver->goingToDelete(member->doc.value().toBson())); } // TODO: Do we want to buffer docs and delete them in a group rather than saving/restoring state |