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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Storage
    • None
    • Storage Execution

    Description

      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).

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: