Replace StorageEngine::flushAllFiles call in waitForWriteConcern function with a functionally equivalent waitUntilDurable call

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Replication
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We can safely change the StorageEngine::flushAllFiles() call in write_concern.cpp when nojournal=true to a regular RecoveryUnit::waitUntilDurable() call.

      Here’s the StorageEngine::flushAllFiles() call I want to switch to RecoveryUnit::waitUntilDurable()
      https://github.com/mongodb/mongo/blob/db3a17bbfe2e265722ed88df961e79f3e1a68067/src/mongo/db/write_concern.cpp#L309

      Here’s what StorageEngine::flushAllFiles() sets when calling WTSessionCache::waitUntilDurable()
      https://github.com/mongodb/mongo/blob/db3a17bbfe2e265722ed88df961e79f3e1a68067/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L1278-L1297

      Here’s what WTSessionCache::waitUntilDurable() does
      https://github.com/mongodb/mongo/blob/db3a17bbfe2e265722ed88df961e79f3e1a68067/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp#L244-L367
      Notice that when _durable = false (nojournal=true), we go all the way to the bottom of the function and take a checkpoint. This is the same as what RecoveryUnit::waitUntilDurable() does when _durable = false (nojournal=true).

            Assignee:
            Unassigned
            Reporter:
            Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: