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

Eliminate the mutex held across JournalListener accesses

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.4
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • Execution Team 2020-02-24, Execution Team 2020-03-09

      waitUntilDurable currently holds a mutex across calls to JournalListener::getToken and JournalListener::onDurable calls. The mutex does not appear necessary for the JournalListener functions. The mutex appears to be for accessing the _journalListener because it can be asynchronously set by another caller via the setJournalListener function on the class.

      Removing the mutex will allow the existing promises in the code comments to become true, which are not currently true because the mutex serializes callers.

      Furthermore, I need to add a write in getToken for the Replicate Before Journaling project, and I don't want to take a mutex before collection locks: removing the mutex simplifies the code changes.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: