[SERVER-65774] applyOps command does not to write to config.image_collection on secondaries in some cases Created: 19/Apr/22 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Josef Ahmad | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
SERVER-65531 describes an issue with malformed oplog entries involving "needsRetryImage" being given to the applyOps command. max.hirschhorn@mongodb.com discovered a corner case that can generate an oplog entry with "needsRetryImage" involving passing a findAndModify oplog entry through the applyOps command. This generates an oplog entry without lsid, txnNumber, and needsRetryImage and as a result secondaries won't update their config.image_collection entry. We've decided to file this issue as a separate ticket as we believe it's not necessarily resolved by SERVER-65531, whose resolution may simply involve writing to config.image_collection if lsid and txnNumber exist. |
| Comments |
| Comment by Max Hirschhorn [ 19/Apr/22 ] |
|
Given that the applyOps command causes the primary to skip writing to config.transactions collection and the primary generates an oplog entry which causes secondaries to also skip writing to config.transactions collection, I think the change here should be to make the applyOps command skip writing to the config.image_collection collection on the primary. Writing to the config.image_collection collection only has value when the config.transactions collection is also being written to. This is because the contents of the config.transactions collection is consulted to find the linked oplog entry for the retryable write and the pre/postImage document is read from the config.image_collection collection upon seeing the linked oplog entry has "needsRetryImage". |