diff options
author | Benety Goh <benety@mongodb.com> | 2020-05-09 08:01:53 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-09 12:34:55 +0000 |
commit | 2829385363926b4344ecd219aa4caf2a3fd6745e (patch) | |
tree | 8136d8f3706cc0595e7377a8a5b104db3eec24f0 | |
parent | d7d3a0d782ced557c26b9eb81ea97cc242762c8f (diff) | |
download | mongo-2829385363926b4344ecd219aa4caf2a3fd6745e.tar.gz |
SERVER-47531 restore OpObserverImpl::onDelete() invariant for document key
-rw-r--r-- | src/mongo/db/op_observer_impl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp index b5e6efeb658..acfad92cd8c 100644 --- a/src/mongo/db/op_observer_impl.cpp +++ b/src/mongo/db/op_observer_impl.cpp @@ -586,7 +586,9 @@ void OpObserverImpl::onDelete(OperationContext* opCtx, StmtId stmtId, bool fromMigrate, const boost::optional<BSONObj>& deletedDoc) { - auto& documentKey = documentKeyDecoration(opCtx).get(); + auto optDocKey = documentKeyDecoration(opCtx); + invariant(optDocKey, nss.ns()); + auto& documentKey = optDocKey.get(); auto txnParticipant = TransactionParticipant::get(opCtx); const bool inMultiDocumentTransaction = |