[SERVER-46825] Replace StorageEngine::flushAllFiles call in waitForWriteConcern function with a functionally equivalent waitUntilDurable call Created: 12/Mar/20  Updated: 06/Dec/22

Status: Open
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Participants:

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


Generated at Thu Feb 08 05:12:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.