[SERVER-7311] repl set rollback and earlycommits and journaling issue Created: 10/Oct/12 Updated: 06/Dec/22 Resolved: 14/Jun/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dwight Merriman | Assignee: | Backlog - Replication Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Replication
|
| Operating System: | ALL |
| Participants: |
| 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. |
| Comments |
| Comment by Spencer Brody (Inactive) [ 14/Jun/18 ] |
|
Rollback has been majorly rewritten since this ticket was filed, plus the journaling behavior on WT is very different than it was on MMAP |
| Comment by Dwight Merriman [ 10/Oct/12 ] |
|
one solution perhaps: if we early commit, we truncate the oplog (precommit finalization) to our current location first. does that solve? |