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

repairDatabasesAndCheckVersion should not hold a lock while calling on StorageRepairObserver::onRepairDone

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Execution Team 2019-10-21

      StorageRepairObserver::onRepairDone calls StorageRepairObserver::_invalidateReplConfigIfNeeded , which writes out a document and then calls waitUntilDurable(). We must hold a lock for the data write, but should not for the waitUntilDurable() call, as we are trying to add an invariant against holding locks for a potentially long I/O call in waitUntilDurable() in SERVER-39591.

      repairDatabasesAndCheckVersion currently holds a global exclusive lock across all of its work. Perhaps elevate the waitUntilDurable() call to the repairDatabasesAndCheckVersion level, or even a level higher, somehow, outside the lock or while the lock is momentarily released.

            Assignee:
            evgeni.dobranov@mongodb.com Evgeni Dobranov
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: