...
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
xgen-internal-githook commented on Mon, 16 Jun 2014 21:34:08 +0000: Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'} Message: SERVER-13729: Fix Data File Growth on Windows Reuse an existing lock to use as a lock to handle the race condition between _flushAll, and the memory mapped file being closed instead of holding LockMongoFilesxxx for an excessively long time. (cherry picked from commit c4fa4dc85aec3b8dfd9ada7a58521d8f1bbf4fff) Branch: v2.6 https://github.com/mongodb/mongo/commit/c98867bc6805da23c35c5c827c96f27a6a349006 xgen-internal-githook commented on Thu, 5 Jun 2014 23:07:40 +0000: Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'} Message: SERVER-13729: Fix Data File Growth on Windows Reuse an existing lock to use as a lock to handle the race condition between _flushAll, and the memory mapped file being closed instead of holding LockMongoFilesxxx for an excessively long time. Branch: master https://github.com/mongodb/mongo/commit/c4fa4dc85aec3b8dfd9ada7a58521d8f1bbf4fff