-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.1.1
-
Component/s: Internal Code
-
Fully Compatible
-
ALL
-
Dev Tools 2018-11-19
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.
- 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