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

Reads & Writes are blocked during data file allocation on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.6.4, 2.7.2
    • Storage
    • Fully Compatible
    • Windows
    • Server 2.7.2

    Description

      Issue Status as of Jul 18, 2014

      ISSUE SUMMARY
      On Windows, all reads and writes are blocked during data file allocation due to unecessary locking.

      USER IMPACT
      mongod stops processing all requests until I/O is completed. This has a negative performance impact, and if the blocking is too long it can impact heartbeats on replica sets.

      WORKAROUNDS
      N/A

      AFFECTED VERSIONS
      MongoDB production releases up to 2.6.3 are affected by this issue.

      FIX VERSION
      The fix is included in the 2.6.4 production release.

      RESOLUTION DETAILS
      Add a dedicated lock to handle the case of the race condition between _flushAll and the file being closed.

      Original description

      T1: Generic Query Thread: Holds: Nothing, Acquires DBLock(R), Waits on T2
      T2: AllocateFile Thread: Holds DBLock(W), Acquires: LockMongoFilesExclusive, Waits T3
      T3: Flush: Holds LockMongoFilesShared, Waits: I/O

      Problem: The MemoryMappedFile class needs to support concurrency, but was not correctly implemented so the wrong lock was used which causes unneeded synchronization.
      Fix: Add a dedicated lock to handle the case of the race condition between _flushAll, and the file being closed.
      Introduced in the fix for SERVER-7973

      Attachments

        Issue Links

          Activity

            People

              mark.benvenuto@mongodb.com Mark Benvenuto
              mark.benvenuto@mongodb.com Mark Benvenuto
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: