-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Sharding 2022-03-07
Having the DocumentSourceReshardingIterateTransaction stage after DocumentSourceFindAndModifyImageLookup stage makes the resharding pipeline unable to forge a pre/post image oplog entry for a non terminal applyOps oplog entry. We should reorder the stages as follows:
- [DocumentSourceReshardingIterateTransaction] For committed transactions, emit the applyOps prevOpTime chain in ascending opTime order.
- [DocumentSourceFindAndModifyImageLookup] For a needsRetryImage CRUD or applyOps oplog entry, emit an op=n and modify the subsequent the oplog entry to say pre/postImageOpTime
- [DocumentReshardingAddId] Fill in an _id so already-seen oplog entries can be ignored.
Right now the _id adding is done as part of the DocumentSourceReshardingIterateTransaction stage since it is only stage that tracks the transaction commit timestamp. Therefore, for this ordering to work, we need to store the commit timestamp in each applyOps document emitted in the DocumentSourceReshardingIterateTransaction stage and in its forged pre/post image document in the DocumentSourceFindAndModifyImageLookup stage (if any) similar to how was done here.
- depends on
-
SERVER-63879 Make findAndModify image lookup aggregation stage handle applyOps oplog entries
- Closed
- is depended on by
-
SERVER-63444 [Retryability] Make retryable findAndModify executed in internal transactions retryable across resharding
- Closed