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

FileAllocator::get not thread-safe

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.12
    • Affects Version/s: None
    • Component/s: MMAPv1
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Sharding 2016-08-29

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

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

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

              Created:
              Updated:
              Resolved: