-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QE 2022-04-04, QE 2022-02-21, QE 2022-03-07, QE 2022-03-21
For write operations in a mongodb transaction it is desirable to write change stream pre-images in the main storage engine transaction before the storage engine transaction reaches the Prepared state as opposed to writing the pre-images in a storage engine transaction that commits oplog entry(-ies) indicating that the transaction prepared.
If the pre-images are not written in the main transaction as described above, when a prepared transaction is aborted, the pre-images associated with operations of that transaction get written on the primary node, but not on the secondaries. This happens because when the oplog is applied on the secondaries, the aborted transactions essentially don’t trigger any action on the secondaries. The expired pre-image deletion process ultimately gets rid of these documents. However, inconsistent pre-image state between the primary and secondary nodes is not ideal and can delay deletion of pre-images associated with prepared and later aborted transactions.
Explore the options of achieving this improvement and implement the best one if feasible.
- related to
-
SERVER-63258 Resolve inconsistency around the write to the findAndModify image collection for prepared internal transactions
- Closed