[SERVER-59857] Retryable write should use uassert when oplog format is not expected Created: 09/Sep/21  Updated: 14/Sep/21  Resolved: 14/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Max Hirschhorn
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Sharding 2021-09-20
Participants:

 Description   

I think it is possible to construct a sequence of writes that could trip this invariant:
https://github.com/mongodb/mongo/blob/075fdb1e7a56285e357fadf1ea69a10f870ba524/src/mongo/db/ops/write_ops_retryability.cpp#L113



 Comments   
Comment by Max Hirschhorn [ 13/Sep/21 ]

The extractPreOrPostImage() function is only called for op='u' and op='d' oplog entries. The validateFindAndModifyRetryability() function is always called beforehand and would throw if the oplog entry didn't have one of the three fields in question.

Generated at Thu Feb 08 05:48:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.