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

Reads & Writes are blocked during Memory Map File Remap on win/solaris

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.10, 2.6.0
    • Component/s: Storage
    • None
    • Windows

      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.

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

              Created:
              Updated:
              Resolved: