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

FileAllocator::get not thread-safe

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.3.12
    • None
    • MMAPv1
    • None
    • Fully Compatible
    • ALL
    • Sharding 2016-08-29

    Description

      FileAllocator* FileAllocator::get() {
          if (!_instance)
              _instance = new FileAllocator();
          return _instance;
      }
      

      _instance must protect by mutex , or directly assign by new FileAllocator.

      Attachments

        Activity

          People

            schwerin@mongodb.com Andy Schwerin
            yjhjstz Jianghua Yang
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: