[SERVER-13092] shell bulk API replaceOne behaves like updateOne Created: 07/Mar/14 Updated: 19/Jun/23 Resolved: 19/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.6.4, 2.7.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andreas Nilsson | Assignee: | [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | 26qa, move-stm, sdp-backlog-purge | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Server Development Platform
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Steps To Reproduce: | The following code should fail but instead it updates the {a:0}document.
|
||||||||||||||||
| Sprint: | Build A (10/09/15), Build B (10/30/15) | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
According to the fluent API spec https://github.com/10gen/specifications/blob/master/source/driver-fluent-api.rst replaceOne should always replace and never update a document. This should be ensured by checking that the new document is not prefixed with '$'. This is currently not enforced in the shell bulk API implementation. replaceOne calls updateOne directly without any extra checks. |
| Comments |
| Comment by Alex Neben [ 19/Jun/23 ] |
|
This has been identified as work that the SDP team won't do in the near term. Please reopen with a comment if you feel this work should be reprioritized and explain why. |
| Comment by Steven Vannelli [ 10/May/22 ] |
|
Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions. |