-
Type: Improvement
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
RPL A (10/09/15)
-
0
Currently we record "minValid" when applying each back during replication as a marker of the (minimum) valid point we must reach to allow reads and to transition out of startup/recovery to secondary/primary. This approach works fine as long as we always apply write to all database and insert the ordered oplog entries as the last step in an atomic write operation.
The task here is to record both the start and end of each batch so the can do writes in the batch in any order needed. For some storage engines combining writes across database, including recording the oplog entries, performs better and can be optimized but doesn't work with the current "minValid" safety design.
Recording both the start and end will allow us to just apply those entries in the case of failure during recovery, or as a indication that replication has not finished.
When the batch apply is successfully done we will (logically) reset the value to just the end (or "minValid") to indicate completion and to be backwards compatible (to allow for downgrading).
- is depended on by
-
SERVER-18983 Process oplog inserts, and applying, on the secondary in parallel
- Closed
- is related to
-
SERVER-20466 Rollback and batch apply can each set minvalid independantly
- Closed