[SERVER-46533] CmdUpdate should persist underlying BSON Created: 02/Mar/20  Updated: 29/Oct/23  Resolved: 11/Mar/20

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

Type: Bug Priority: Major - P3
Reporter: Benjamin Caimano (Inactive) Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Gantt Dependency
has to be done before SERVER-46521 Extend mirrored reads generation tests Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Service Arch 2020-03-09, Service Arch 2020-03-23
Participants:

 Description   

It appears that CmdUpdate does not persist the BSONObj it uses to make its write_ops batch. This is fine when the CommandInvocation lives as long as the underlying OpMsgRequest, but causes use-after-free when the CommandInvocation can be used off thread. We need to either make a BSONObj member for the actual Invocation or for the batch object. There is a small chance that this is a non-issue and there is some other problem causing terminate style failure when updates are mirrored.



 Comments   
Comment by Githook User [ 19/Oct/21 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-46533 Persist underlying BSON in CmdUpdate invocation

(cherry picked from commit 270bd8cb3def190b7a46b02a65cbbedacbed7a9c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/2acb4a22da20968ba90f60f482877f10511308e9

Comment by Githook User [ 11/Mar/20 ]

Author:

{'username': 'samanca', 'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com'}

Message: SERVER-46533 Persist underlying BSON in CmdUpdate invocation
Branch: master
https://github.com/mongodb/mongo/commit/270bd8cb3def190b7a46b02a65cbbedacbed7a9c

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