Details
-
Bug
-
Resolution: Done
-
Minor - P4
-
2.1.1
-
Fully Compatible
-
ALL
-
Dev Tools 2018-11-19
Description
The definition of MONGO_SOMETIMES contains a race condition. It's current implementation is as follows:
#define MONGO_SOMETIMES( occasion, howOften ) for( static unsigned occasion = 0; ++occasion % howOften == 0; )
|
Plain-and-simple not thread safe.
Attachments
Issue Links
- is related to
-
SERVER-37247 Rarely macro should log first use of deprecated command
-
- Closed
-
-
SERVER-14536 Helgrind suppressions for race-prone counters.cpp code
-
- Closed
-