-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Storage Execution
-
Fully Compatible
-
Execution Team 2023-11-27
-
162
Right now the JournalFlusher thread [destroys and recreates](https://github.com/mongodb/mongo/blob/1501ee35cbe0fba60ecf1d77faa15bc6021a5551/src/mongo/db/storage/control/journal_flusher.cpp#L132-L134) its OperationContext on each iteration of the loop. This isn't a cheap operation, and it isn't necessary. We should instead remove that code and make sure that we release the snapshot prior to sleeping in each iteration. We will also need to be careful not to reuse the OpCtx after it is interrupted.
This isn't the biggest bottleneck in the j:1 latency, but because there is only one thread doing the loop, and this currently happens after we are notified that someone is waiting for journaling, it does contibute to j:1 latency. And its relative impact will grow as we address other bottlenecks.
- causes
-
SERVER-83579 Data race for setup the opCtx in flush journal
- Closed