[SERVER-56375] [RRFaM] Have delete path write to config.transactions Created: 27/Apr/21  Updated: 29/Oct/23  Resolved: 11/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.25, 4.2.15, 4.4.7, 5.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-56518 findAndModify deletes unconditionally... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4, v4.2, v4.0
Sprint: Repl 2021-05-17
Participants:

 Description   

When the RRFaM behavior is enabled:

  • A primary executing the delete can add a remove preImage to the SessionTxnRecord within the same WUOW.
  • A secondary applying the delete can also add the preImage to the SessionTxnRecord within the same WUOW.
    • Right now the deleteObjects return value does not provide the preImage. This ticket should expose that API.
    • However the config.transactions.update predicate must include the clause: `{txnNum: {$lt: <updated txnNum>`}}.
  • Remove noop oplog entry writes for FaM removes
  • Collections that always store preImages must continue to write pre-image noops for findAndModify's that remove a document.
    • These findAndModify's should not write the preImage to a config.transactions document
    • The current OpObserver::onDelete API cannot distinguish between an engaged deletedDoc due to a findAndModify versus the collection configuration (without attempting to read the collection catalog using the input collection UUID). One solution is to create a structure similar to the CollectionUpdateArgs
    • Changing the onDelete API may be necessary, which would allow us to correct SERVER-56518.


 Comments   
Comment by Githook User [ 24/May/21 ]

Author:

{'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}

Message: SERVER-56375: [RRFaM] BACKPORT-8905 Have delete path write to config.transactions
Branch: v4.2
https://github.com/mongodb/mongo/commit/8b9eaa903128dea6c70093bddd8d2a241473ac24

Comment by Githook User [ 21/May/21 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-56375: Add ability to write retryable findAndModify deletes to `config.image_collection`.

(cherry picked from commit ade401ca5f7a1ae4475d30f84b636e259397fd63)
Branch: v4.4
https://github.com/mongodb/mongo/commit/47e41c3c63a294f003c94544a20dbd865d578367

Comment by Githook User [ 11/May/21 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-56375: Add ability to write retryable findAndModify deletes to `config.image_collection`.
Branch: master
https://github.com/mongodb/mongo/commit/ade401ca5f7a1ae4475d30f84b636e259397fd63

Comment by Githook User [ 07/May/21 ]

Author:

{'name': 'Jason Chan', 'email': 'jason.chan@10gen.com', 'username': 'jasonjhchan'}

Message: SERVER-56375: Add ability to write retryable findAndModify deletes to `config.image_collection`
Branch: v4.0
https://github.com/mongodb/mongo/commit/a9e89da837617ab09628d736482705f81ee110bd

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