[SERVER-56518] findAndModify deletes unconditionally write preImage no-op oplog entries, leading to crash during chunk migration Created: 30/Apr/21  Updated: 29/Oct/23  Resolved: 07/Jun/21

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: 4.4.0
Fix Version/s: 4.4.7, 5.0.0-rc1, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn 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
depends on SERVER-56375 [RRFaM] Have delete path write to con... Closed
Problem/Incident
is caused by SERVER-45806 Record pre-images on updates and dele... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
Sprint: Repl 2021-05-03, Repl 2021-06-14
Participants:
Linked BF Score: 127

 Description   

OpObserverImpl::onDelete() is always called with engaged deletedDoc value for findAndModify deletes.

The consequences of this are two-fold:

  1. findAndModify deletes within a multi-statement transaction write preImage no-op oplog entries, even when the recordPreImages collection option is set to false (the default). This leads to write amplification akin to SERVER-45442.
  2. preImage no-oplog entries from multi-statement transaction deletes do not include session information. This leads donor shards in chunk migrations to crash when parsing them.


 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 08/Jun/21 ]

Author:

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

Message: SERVER-56518: Only record preimages for findAndModify deletes in multi-statement transactions when the recordPreImage collection option is set.

(cherry picked from commit a2f2a57609308271b2fce1cab9bbf7f08a5eda18)
Branch: v5.0
https://github.com/mongodb/mongo/commit/c9a7544a7ca9b4001b3d91d9e5334b649fd333aa

Comment by Githook User [ 07/Jun/21 ]

Author:

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

Message: SERVER-56518: Only record preimages for findAndModify deletes in multi-statement transactions when the recordPreImage collection option is set.

(cherry picked from commit a2f2a57609308271b2fce1cab9bbf7f08a5eda18)
Branch: v4.4
https://github.com/mongodb/mongo/commit/335c011f5e48416ec22eebe415a66a1d9ddb1216

Comment by Githook User [ 07/Jun/21 ]

Author:

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

Message: SERVER-56518: Only record preimages for findAndModify deletes in multi-statement transactions when the recordPreImage collection option is set.
Branch: master
https://github.com/mongodb/mongo/commit/a2f2a57609308271b2fce1cab9bbf7f08a5eda18

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