[SERVER-45653] avoid writing unneeded fields to no-op oplog entry to findAndModify with retryable writes Created: 19/Jan/20 Updated: 27/Oct/23 Resolved: 15/Mar/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Bernard Gorman |
| Resolution: | Gone away | Votes: | 15 |
| Labels: | qexec-team, query-director-triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Sprint: | Query 2020-09-21, Query 2020-10-05, Query 2020-10-19, Query 2020-11-02, Query 2020-12-14, Query 2020-12-28, Query 2021-01-11, Query 2021-01-25, Query Execution 2021-04-05, Query Execution 2021-04-19 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| Description |
|
SERVER-31242 describes how we should apply the original projection to findAndModify when retrying the operation as part of retryable writes project. However, avoiding writing the full document into the no-op oplog entry rather than just the necessary fields would keep size of the oplog small, and may make it unnecessary to do the work described in SERVER-31242. |
| Comments |
| Comment by Bernard Gorman [ 15/Mar/22 ] |
|
As of MongoDB 5.1, we no longer store findAndModify preimages in the oplog. As such, I'm closing this ticket as Gone Away. The fix was backported to 4.0, 4.2, and 4.4 as well. |
| Comment by Ian Boros [ 29/Jan/21 ] |
|
After discussion with kateryna.kamenieva and david.storch we have decided to return this ticket to the backlog. The fix that I proposed is not backportable because it introduces new fields to oplog entries. My patch was also a bit of a "band-aid" and a more complete fix using the approach described in my comment here would be preferable. Unfortunately the more complete fix would likely involve extensive changes to the old execution engine. |
| Comment by Asya Kamsky [ 28/Jul/20 ] |
|
In 4.2 the drivers default retryable writes option to true so we are seeing this more as people upgrade. |