diff options
author | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2021-07-16 20:53:20 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-27 00:01:51 +0000 |
commit | 81dd7b36b863e57c0cbba1032a550bb55f353390 (patch) | |
tree | 80ffe8fe4aeb2f2c3e1c70fee9ebe013badc2dca /src/mongo/db/operation_context_test.cpp | |
parent | 104a14d151133302184522921a1a3225c8eb8824 (diff) | |
download | mongo-81dd7b36b863e57c0cbba1032a550bb55f353390.tar.gz |
SERVER-58403 Serialize concurrent accesses to OperationContext::_comment
Diffstat (limited to 'src/mongo/db/operation_context_test.cpp')
-rw-r--r-- | src/mongo/db/operation_context_test.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/operation_context_test.cpp b/src/mongo/db/operation_context_test.cpp index e06c084101a..66fcda8632a 100644 --- a/src/mongo/db/operation_context_test.cpp +++ b/src/mongo/db/operation_context_test.cpp @@ -1151,6 +1151,8 @@ TEST(OperationContextTest, CurrentOpExcludesKilledOperations) { // of an `opCtx`. This is because `CurOp::reportCurrentOpForClient()` accepts an `opCtx` // as input and requires it to be present throughout its execution. stdx::thread thread([&]() mutable { + stdx::lock_guard<Client> lk(*opCtx->getClient()); + auto threadClient = serviceCtx->makeClient("ThreadClient"); // Generate report in absence of any opCtx |