diff options
author | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2022-11-03 16:13:20 +0000 |
---|---|---|
committer | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2022-11-03 16:13:20 +0000 |
commit | e74d2910bbe76790ad131d53fee277829cd95982 (patch) | |
tree | cabe148764529c9623652374fbc36323a550cd44 /src/mongo/db/ops/update_request.h | |
parent | 280145e9940729480bb8a35453d4056afac87641 (diff) | |
parent | ba467f46cc1bc49965e1d72b541eff0cf1d7b22e (diff) | |
download | mongo-e74d2910bbe76790ad131d53fee277829cd95982.tar.gz |
Merge branch 'master' into jenniferpeshansky/SERVER-70854jenniferpeshansky/SERVER-70854
Diffstat (limited to 'src/mongo/db/ops/update_request.h')
-rw-r--r-- | src/mongo/db/ops/update_request.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mongo/db/ops/update_request.h b/src/mongo/db/ops/update_request.h index ed775c9e15e..e635ce7f156 100644 --- a/src/mongo/db/ops/update_request.h +++ b/src/mongo/db/ops/update_request.h @@ -76,7 +76,7 @@ public: }; UpdateRequest(const write_ops::UpdateOpEntry& updateOp = write_ops::UpdateOpEntry()) - : _updateOp(updateOp) {} + : _updateOp(updateOp), _sampleId(updateOp.getSampleId()) {} void setNamespaceString(const NamespaceString& nsString) { _nsString = nsString; @@ -257,6 +257,14 @@ public: return _stmtIds; } + void setSampleId(boost::optional<UUID> sampleId) { + _sampleId = sampleId; + } + + const boost::optional<UUID>& getSampleId() const { + return _sampleId; + } + std::string toString() const { StringBuilder builder; builder << " query: " << getQuery(); @@ -314,6 +322,9 @@ private: // The statement ids of this request. std::vector<StmtId> _stmtIds = {kUninitializedStmtId}; + // The unique sample id for this request if it has been chosen for sampling. + boost::optional<UUID> _sampleId; + // Flags controlling the update. // God bypasses _id checking and index generation. It is only used on behalf of system |