[SERVER-13725] Reads & Writes are blocked during Memory Map File Remap on win/solaris Created: 24/Apr/14  Updated: 04/Jun/14  Resolved: 30/May/14

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.4.10, 2.6.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-9868 heartbeats not responded to during mm... Closed
is depended on by SERVER-12880 Server pauses on requests every 60 se... Closed
is depended on by SERVER-13444 Long locked flush without inserts and... Closed
Operating System: Windows
Participants:

 Description   

Background

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

Problem: Remap on Windows & Solaris is not atomic, we need to guard access to memory while mmap is occuring.
Fix: Since there is only one writer, we only need to guard readers against remap. Add a dedicated lock for this, and do not use the LockMongoFilesxxx

The writer does not need the lock since he has sequential consistency, he either reads/writes view or remaps, not both at the same time.



 Comments   
Comment by Mark Benvenuto [ 30/May/14 ]

After more investigation, particularly on Solaris, this is not an issue since the LockMongoFilesShared lock only exists on Windows. On Windows, this issue does not have to be fixed after LockMongoFilesShared is removed from the flush code path in SERVER-13729

Generated at Thu Feb 08 03:32:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.