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/curop_test.cpp | |
parent | 104a14d151133302184522921a1a3225c8eb8824 (diff) | |
download | mongo-81dd7b36b863e57c0cbba1032a550bb55f353390.tar.gz |
SERVER-58403 Serialize concurrent accesses to OperationContext::_comment
Diffstat (limited to 'src/mongo/db/curop_test.cpp')
-rw-r--r-- | src/mongo/db/curop_test.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/curop_test.cpp b/src/mongo/db/curop_test.cpp index 857ef674d52..332e7d9042e 100644 --- a/src/mongo/db/curop_test.cpp +++ b/src/mongo/db/curop_test.cpp @@ -232,7 +232,10 @@ TEST(CurOpTest, ShouldNotReportFailpointMsgIfNotSet) { // Test the reported state should _not_ contain 'failpointMsg'. BSONObjBuilder reportedStateWithoutFailpointMsg; - curop->reportState(opCtx.get(), &reportedStateWithoutFailpointMsg); + { + stdx::lock_guard<Client> lk(*opCtx->getClient()); + curop->reportState(opCtx.get(), &reportedStateWithoutFailpointMsg); + } auto bsonObj = reportedStateWithoutFailpointMsg.done(); // bsonObj should _not_ contain 'failpointMsg' if a fail point is not set. |