[SERVER-27096] applyOps should validate its ops to ensure idempotency Created: 17/Nov/16 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Backlog - Replication Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | applyOps, idempotency, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
applyOps commands can include things like $inc operators that make them non-idempotent. Since applyOps entries get put in the oplog unchanged, non-idempotent applyOps commands can lead to non-idempotent oplog entries which is problematic. We do not create any bad applyOps entries internally, but external ones are allowed. We should check applyOps commands before running them and error on non-idempotent operations. |
| Comments |
| Comment by Matthew Russotto [ 09/Feb/18 ] |
|
The doTxn changes don't affect (non-atomic) applyOps. I don't think it would be too difficult but it would result in the oplog entry not being stored exactly as given. |
| Comment by Spencer Brody (Inactive) [ 14/Dec/17 ] |
|
The change to doTxn in |