Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
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).