diff options
author | Martin Neupauer <xmaton@messengeruser.com> | 2021-04-21 09:38:49 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-29 21:49:53 +0000 |
commit | a1dd77a37ab054564904ce8d0f04dacca04a9d2a (patch) | |
tree | 04cfe21a3419c9bf0d3a101be27fe326db0a8342 /src/mongo/db/query/plan_executor_sbe.h | |
parent | 7fe73c9955e44c7e99c5c3487454bb2ad64740e1 (diff) | |
download | mongo-a1dd77a37ab054564904ce8d0f04dacca04a9d2a.tar.gz |
SERVER-55498 Prevent SBE from using unowned values from storage after
yield
This change ensures that accesors produce valid values after yield.
Diffstat (limited to 'src/mongo/db/query/plan_executor_sbe.h')
-rw-r--r-- | src/mongo/db/query/plan_executor_sbe.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/query/plan_executor_sbe.h b/src/mongo/db/query/plan_executor_sbe.h index 918b2c8670a..191853cc9ce 100644 --- a/src/mongo/db/query/plan_executor_sbe.h +++ b/src/mongo/db/query/plan_executor_sbe.h @@ -155,6 +155,9 @@ private: boost::optional<sbe::value::SlotId> _resumeRecordIdSlot; std::queue<std::pair<BSONObj, boost::optional<RecordId>>> _stash; + // If we are returning owned result (i.e. value is moved out of the result accessor) then its + // lifetime must extend up to the next getNext (or saveState). + BSONObj _lastGetNext; // If _killStatus has a non-OK value, then we have been killed and the value represents the // reason for the kill. |