[SERVER-83429] Retryable FLE2 update and findAndModify fails on retry if document is removed Created: 17/Nov/23  Updated: 06/Dec/23  Resolved: 22/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0, 7.0.5

Type: Bug Priority: Major - P3
Reporter: Erwin Pe Assignee: Erwin Pe
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.2, v7.0
Steps To Reproduce:

1. create QE encrypted collection: testColl
2. insert document {_id: 1, name: "erwin"}
3. start session with retryable writes
4. (in session) update/findAndModify {_id: 1} and set "name" to something else
5. (outside session) delete {_id: 1}
6. (in session) issue the same command as #4: fails due to code 7293302.

Sprint: Security 2023-11-27
Participants:
Linked BF Score: 157

 Description   

On a FLE2 collection, if a document that was modified by a retryable update/findAndModify is subsequently deleted, and the update/findAndModify was retried, instead of returning the same response as the original operation, the server returns an error: "Could not find pre-image document by _id". with code 7293302.



 Comments   
Comment by Githook User [ 06/Dec/23 ]

Author:

{'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}

Message: SERVER-83429 Fix retryable FLE2 update & findAndModify failing on retry if document is removed

GitOrigin-RevId: 213bb605d12141d896f69b60bd7b397d3d1265a1
Branch: v7.0
https://github.com/mongodb/mongo/commit/fe3fa59cc693560e6af30e927fd341c90c7aeccf

Comment by Githook User [ 21/Nov/23 ]

Author:

{'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}

Message: SERVER-83429 Fix retryable FLE2 update & findAndModify failing on retry if document is removed
Branch: master
https://github.com/mongodb/mongo/commit/e1298b7a2377fbae8700c9de50c5ecfeb8bd6011

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