[SERVER-55909] Prevent a single WUOW from writing multiple oplog entries by default Created: 08/Apr/21 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Henrik Edin | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | techdebt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Having WUOWs that perform multiple writes resulting in multiple oplog entries seem really convenient for the primary as you get atomicity. However when this is replicated it is no longer done atomically. This can result in cases where the code works 99% of the time but result in difficult to diagnose BFs where some of the writes got rolled back. It can also cause issues related to timestamping where a write can "inherit" a timestamp set by another write. Also resulting to difficult to diagnose BFs. We do have cases where writing multiple oplog entries in a single WUOW is safe and perfectly fine but we should make them a special case where they explicitly enable this behavior. By default it should not be allowed to write multiple oplog entries in a WUOW. |
| Comments |
| Comment by Andy Schwerin [ 25/Jan/22 ] |
|
I'd like to counter-propose making multiple writes in a single WUOW replicate in the same way as a multi-document transaction. I hope to investigate this approach in the coming months. |