Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5739

Race condition in SOMETIMES/MONGO_SOMETIMES macros

    XMLWordPrintableJSON

Details

    • 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

        Activity

          People

            billy.donahue@mongodb.com Billy Donahue
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: