[SERVER-34877] findAndModify with upsert allows creating shard keys greater than 512 bytes Created: 07/May/18 Updated: 27/Oct/23 Resolved: 15/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding, Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Katya Kamenieva |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | ShardingRoughEdges, qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Description |
|
I was able to insert a document with combined shard key value > 512 by using findAndModify with query for that shard key value and then upsert:true and update which sets those fields again. The check for shard key > 512 seems to get bypassed.
|
| Comments |
| Comment by Craig Homa [ 15/Sep/20 ] |
|
Closing as this problem has gone away due to the restriction being removed in 4.4. Ref: |
| Comment by Asya Kamsky [ 11/Feb/20 ] |
|
Turns out this isn't an issue anymore for 4.4 as there is a different way to limit the size of the result from splitVector.
This ticket should be just about what to do in 4.2 (and 4.0).
|
| Comment by Sheeri Cabral (Inactive) [ 30/Jan/20 ] |
|
Is this something query can fix by throwing an error? kateryna.kamenieva |