-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Storage
-
None
-
Fully Compatible
-
v4.4
-
Execution Team 2020-03-23, Execution Team 2020-04-06, Execution Team 2020-04-20, Execution Team 2020-05-04, Execution Team 2020-05-18, Execution Team 2020-06-01, Execution Team 2020-06-15, Execution Team 2020-06-29, Execution Team 2020-09-07
-
38
Always create the JournalFlusher, regardless of ephemeral or non-durable storage engine settings, because using it to wait for write concern should be a performance gain for all settings and also simplifies the logic.
Today we skip creating the JournalFlusher thread for both ephemeral or non-durable (nojournal=true) storage engine settings.
https://github.com/mongodb/mongo/blob/db3a17bbfe2e265722ed88df961e79f3e1a68067/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L989-L993
Originally, the JournalFlusher was purely a periodically running task. However, recently, that changed. The JournalFlusher is now a periodic task that can also be pinged for an immediate run.
(Old in v4.2)
https://github.com/mongodb/mongo/blob/e329dd322df4a226b143031c99b5f943d3a9be4a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L251
(New in v4.4)
https://github.com/mongodb/mongo/blob/db3a17bbfe2e265722ed88df961e79f3e1a68067/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L305-L307
Moving the write_concern.cpp waitUntilDurable calls onto the JournalFlusher thread via waitForJournalFlush has been a big performance win. Currently, we use logic in waitForJournalFlush to skip the JournalFlusher thread when it doesn’t exist and instead call waitUntilDurable directly.
https://github.com/mongodb/mongo/blob/db3a17bbfe2e265722ed88df961e79f3e1a68067/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L2377-L2383
We would want to override the periodical functionality of the JournalFlusher thread when ephemeral or !durable, I think, and make it purely run when requested. Taking checkpoints so frequently for non-durable (nojournal) might slow down the system; and ephemeral only updates the JournalListener (durable timestamp).
- depends on
-
SERVER-48650 Unit tests' ServiceContext's NetworkInterfaceMockClockSource cannot continue to depend upon the lifetime of the ReplicationCoordinator to remain valid
- Closed
-
SERVER-45847 Pull the JournalFlusher out of the storage engine layer and place it above the storage engine
- Closed
- is depended on by
-
SERVER-48149 Move callers of waitUntilDurable onto JournalFlusher::waitForJournalFlush
- Closed