[SERVER-82984] FLE2 with upsert: true can have upsertedDocuments.size() == 1 and updateReply.getNModified() == 1 at the same time Created: 08/Nov/23 Updated: 27/Nov/23 Resolved: 13/Nov/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc0, 7.2.0-rc2, 7.0.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Frederic Vitzikam | Assignee: | Erwin Pe |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Server Security
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v7.2, v7.0
|
||||||||
| Sprint: | Security 2023-11-13, Security 2023-11-27 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
sean.zimmerman@mongodb.com found that the following 2 lines looked like a bug: https://github.com/10gen/mongo-enterprise-modules/blob/master/jstests/fle2/bulk_write_update.js#L162 and https://github.com/10gen/mongo-enterprise-modules/blob/master/jstests/fle2/bulk_write_update.js#L176 I confirmed that this is not from BulkWrite but from processFLEUpdate. erwin.pe@mongodb.com pointed to the code here and double checked that on a normal upsert this case would be nModified = 0 and n = 1. So nModified should be set here only if lastErrorObject.updatedExisting == true. |
| Comments |
| Comment by Githook User [ 16/Nov/23 ] |
|
Author: {'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}Message: (cherry picked from commit d0c3d8916ee8a0bf5aa151cba1413cc442e30adf) |
| Comment by Githook User [ 16/Nov/23 ] |
|
Author: {'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}Message: (cherry picked from commit d0c3d8916ee8a0bf5aa151cba1413cc442e30adf) |
| Comment by Githook User [ 13/Nov/23 ] |
|
Author: {'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}Message: |