diff options
author | jannaerin <golden.janna@gmail.com> | 2022-10-26 12:42:19 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-26 13:19:56 +0000 |
commit | 74643965f0adb82893281de253ea87c3f7fb7560 (patch) | |
tree | 4428f60591b2f5efaf3a4eba33a79f9aa4e1f7e5 /src/mongo/db/ops | |
parent | ccbc2b483f7ef25df8c9f35e58ce235909179f12 (diff) | |
download | mongo-74643965f0adb82893281de253ea87c3f7fb7560.tar.gz |
SERVER-69715 Enable currentOp to be run in multitenancy mode
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r-- | src/mongo/db/ops/write_ops_exec.cpp | 12 | ||||
-rw-r--r-- | src/mongo/db/ops/write_ops_retryability.cpp | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/mongo/db/ops/write_ops_exec.cpp b/src/mongo/db/ops/write_ops_exec.cpp index 07a7e7bd7a7..f22d3a915e1 100644 --- a/src/mongo/db/ops/write_ops_exec.cpp +++ b/src/mongo/db/ops/write_ops_exec.cpp @@ -648,7 +648,7 @@ WriteResult performInserts(OperationContext* opCtx, if (source != OperationSource::kTimeseriesInsert) { stdx::lock_guard<Client> lk(*opCtx->getClient()); - curOp.setNS_inlock(wholeOp.getNamespace().ns()); + curOp.setNS_inlock(wholeOp.getNamespace()); curOp.setLogicalOp_inlock(LogicalOp::opInsert); curOp.ensureStarted(); curOp.debug().additiveMetrics.ninserted = 0; @@ -940,9 +940,8 @@ static SingleWriteResult performSingleUpdateOpWithDupKeyRetry( auto& curOp = *CurOp::get(opCtx); if (source != OperationSource::kTimeseriesInsert) { stdx::lock_guard<Client> lk(*opCtx->getClient()); - curOp.setNS_inlock(source == OperationSource::kTimeseriesUpdate - ? ns.getTimeseriesViewNamespace().ns() - : ns.ns()); + curOp.setNS_inlock( + source == OperationSource::kTimeseriesUpdate ? ns.getTimeseriesViewNamespace() : ns); curOp.setNetworkOp_inlock(dbUpdate); curOp.setLogicalOp_inlock(LogicalOp::opUpdate); curOp.setOpDescription_inlock(op.toBSON()); @@ -1132,9 +1131,8 @@ static SingleWriteResult performSingleDeleteOp(OperationContext* opCtx, auto& curOp = *CurOp::get(opCtx); { stdx::lock_guard<Client> lk(*opCtx->getClient()); - curOp.setNS_inlock(source == OperationSource::kTimeseriesDelete - ? ns.getTimeseriesViewNamespace().ns() - : ns.ns()); + curOp.setNS_inlock( + source == OperationSource::kTimeseriesDelete ? ns.getTimeseriesViewNamespace() : ns); curOp.setNetworkOp_inlock(dbDelete); curOp.setLogicalOp_inlock(LogicalOp::opDelete); curOp.setOpDescription_inlock(op.toBSON()); diff --git a/src/mongo/db/ops/write_ops_retryability.cpp b/src/mongo/db/ops/write_ops_retryability.cpp index 9c0239a7555..3ca6efeb126 100644 --- a/src/mongo/db/ops/write_ops_retryability.cpp +++ b/src/mongo/db/ops/write_ops_retryability.cpp @@ -123,7 +123,7 @@ BSONObj extractPreOrPostImage(OperationContext* opCtx, const repl::OplogEntry& o TxnNumber txnNumber = oplog.getTxnNumber().value(); Timestamp ts = oplog.getTimestamp(); auto curOp = CurOp::get(opCtx); - const std::string existingNS = curOp->getNS(); + const auto existingNS = curOp->getNSS(); BSONObj imageDoc = client.findOne(NamespaceString::kConfigImagesNamespace, BSON("_id" << sessionId.toBSON())); { |