[SERVER-75879] Upsert permits document to contain multiple _id fields Created: 08/Apr/23 Updated: 29/Oct/23 Resolved: 19/May/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 4.0.0, 4.2.0, 4.4.0, 5.0.0, 6.0.0, 6.3.0-rc3 |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Chi-I Huang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | query-director-triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v7.0, v6.3, v6.0, v5.0, v4.4, v4.2
|
||||||||||||||||||||||||
| Sprint: | QO 2023-05-15, QO 2023-05-29 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
The update subsystem lacks the equivalent of all of these lines from fixDocumentForInsert() to check the document doesn't have multiple _id fields when inserted by an update sent with upsert=true. |
| Comments |
| Comment by Githook User [ 19/May/23 ] |
|
Author: {'name': 'Chi-I Huang', 'email': 'chiihuang@mongodb.com', 'username': ''}Message: |
| Comment by Chi-I Huang [ 17/May/23 ] |
|
Update: The PR has been approved. I try to add integration tests into the same PR if possible. If nontrivial, I will create another ticket for integration tests. For integration tests, there are 2 potential approaches to introduce invalid BSON in jstest. One is to reuse _writeTestPipe and _readTestPipe in jstests/noPassthrough/external_data_source.js. Another one is introduce a generic BSON function in src/mongo/shell/shell_utils.cpp |