Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
Replication
-
ALL
Description
on a replica set rollback, the rollback and the truncation of the oplog need to be one transaction. if there are early commits (commitIfNeeded) this would be violated and cause an issue potentially where a document which was to be rollback in rollback attempt #1 is later not there but in the oplog.
if after restart the second rollback is to the same point, it may be that everything is fine. however that is not certain. my guess is in practice it would be quite hard to get this edge case to happen. that said, it seems wrong though and keeping the contract that the oplog and datafiles are identical makes reasoning about correctness much, much easier regardless.