Currently the code expects all timestamped transactions, which have the potential to update visibility, to call WiredTigerOplogManager::triggerJournalFlush. There are code paths that can set timestamps but not result in calling this method.
Some paths forward to consider include:
- A call to WiredTigerRecoveryUnit::setTimestamp immediately installs the journal flushing "change". One drawback to this is that some recovery units have their timestamp set multiple times. Care should be taken to not create multiple unnecessary "changes".
- Remove OplogInsertChange and have WiredTigerOplogManager::triggerJournalFlush be called directly by all timestamped recovery units before returning from _txnClose.
- Relax the WiredTigerOplogManager::_oplogJournalThreadLoop conditions to run a refresh loop. E.g: always run an iteration every 5 seconds even if it hasn't been notified.