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

Restructure MMAPV1 journaling to not require the global read lock

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.1.1
    • Component/s: Concurrency, Storage
    • None
    • Minor Change

      The current journaling implementation in MMAPV1 requires a global read lock on the mongod instance, to ensure that it can read consistent versions of all database private views when writing the journal. This makes deadlock avoidance in commitIfNeeded() somewhat hairy, and could become a performance bottleneck.

      Instead, mongod should only lock one database at a time (plus the "local" database, perhaps) when writing to the journal from threads other than the durability thread (and optionally also the durability thread).

      For performance, in MMAPV1 only any extremely long running single document update can block other operations if the journal thread is waiting for its completion.

      Best solution is to avoid any updates that update many thousands of fields in a document in a single update.

            Assignee:
            Unassigned Unassigned
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: