-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
Labels:None
-
Fully Compatible
-
Repl 2019-10-07, Repl 2019-10-21
SyncTail::oplogApplication takes a callback function, which is normally the free function multiSyncApply. This callback takes a pointer to a SyncTail and calls methods on it. This is the most tangled part of the control flow.
The only reason to make this function a configurable callback is so tests can override it with a no-op function in order to disable oplog application. This could be done more simply with a configuration option or by subclassing, leaving the main codepath more clear. Convert multiSyncApply (which will have been renamed to applyGroup and moved into OplogApplier) from a free function to a method of OplogApplier.