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

Restructure MMAPV1 journaling to not require the global read lock

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Critical - P2 Critical - P2
    • None
    • 2.1.1
    • Concurrency, Storage
    • None
    • Minor Change

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: