diff options
author | Mina Mahmood <mina.mahmood@mongodb.com> | 2020-06-25 01:26:08 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-26 21:03:41 +0000 |
commit | df5cfdbb62e554f4028bd7effefbde670d8ff76e (patch) | |
tree | bfcc37d8d63ef105d076465a303f1faf00898698 /src/mongo/db/ftdc | |
parent | 94a1ccf9584383166bee53a5dadda44b1070fba3 (diff) | |
download | mongo-df5cfdbb62e554f4028bd7effefbde670d8ff76e.tar.gz |
SERVER-48660 Added lock around _counter increment
Diffstat (limited to 'src/mongo/db/ftdc')
-rw-r--r-- | src/mongo/db/ftdc/controller_test.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/ftdc/controller_test.cpp b/src/mongo/db/ftdc/controller_test.cpp index 6788f66881b..b821d96065a 100644 --- a/src/mongo/db/ftdc/controller_test.cpp +++ b/src/mongo/db/ftdc/controller_test.cpp @@ -61,6 +61,9 @@ public: void collect(OperationContext* opCtx, BSONObjBuilder& builder) final { _state = State::kStarted; + + stdx::unique_lock<Latch> lck(_mutex); + ++_counter; // Generate document to return for collector |