[SERVER-46811] multi=true updates can modify the shard key of orphan documents and cause them to become owned Created: 11/Mar/20 Updated: 29/Oct/23 Resolved: 14/Jul/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.2.0 |
| Fix Version/s: | 4.4.1, 4.7.0, 4.2.15 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Haley Connelly |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.4, v4.2
|
||||||||||||||||
| Sprint: | Sharding 2020-07-13, Sharding 2020-06-15, Sharding 2020-06-29 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The check for whether the shard key is being modified in a multi=true update happens after the check for whether the shard owns the document being updated has said it's fine to proceed with the update. We should instead disallow any attempts to change the shard key in multi=true updates.
|
| Comments |
| Comment by Githook User [ 04/Jun/21 ] | |||||||||
|
Author: {'name': 'Haley Connelly', 'email': 'haley.connelly@mongodb.com', 'username': 'haleyConnelly'}Message: (cherry picked from commit 17e468583ec1a7e9755b34b50eaa7cf017a1c96e) | |||||||||
| Comment by Githook User [ 12/Aug/20 ] | |||||||||
|
Author: {'name': 'Haley Connelly', 'email': 'haley.connelly@mongodb.com', 'username': 'haleyConnelly'}Message: (cherry picked from commit 17e468583ec1a7e9755b34b50eaa7cf017a1c96e) | |||||||||
| Comment by Githook User [ 14/Jul/20 ] | |||||||||
|
Author: {'name': 'Haley Connelly', 'email': 'haley.connelly@mongodb.com', 'username': 'haleyConnelly'}Message: | |||||||||
| Comment by Haley Connelly [ 29/Jun/20 ] | |||||||||
|
Just as an update: The behavior in master has changed since Max posted the repro.
It fails with this right before it has the change to assert "Multi-update operations are not allowed when updating the shard key field". |