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
- is depended on by
-
SERVER-9868 heartbeats not responded to during mmap flushing on Windows
- Closed
-
SERVER-12880 Server pauses on requests every 60 seconds
- Closed
-
SERVER-13444 Long locked flush without inserts and updates
- Closed
- is related to
-
SERVER-14198 Std::set<pointer> and Windows Heap Allocation Reuse produces non-deterministic results
- Closed