[SERVER-39919] movePrimary can leave around "orphaned collections", and there is no "orphaned collection filtering" Created: 01/Mar/19 Updated: 27/Oct/23 Resolved: 15/Mar/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.6.11, 4.0.6, 4.1.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Sharding
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Linked BF Score: | 27 | ||||
| Description |
|
Commands that run concurrently with a movePrimary may silently succeed because they operate on the "orphaned collection" - agg with $out is one example, since agg with $out would otherwise fail if the collection had been dropped. |
| Comments |
| Comment by Kaloian Manassiev [ 15/Mar/19 ] |
|
This will go away with the Tracking Unsharded Collections project. |
| Comment by Esha Maharishi (Inactive) [ 05/Mar/19 ] |
|
kaloian.manassiev Because of this ticket, I realized I think targeting for writes after movePrimary could be fixed by holding the movePrimary critical section until after the unsharded collections are dropped from the donor. This way, commands against the donor that check for the existence of the unsharded collection would either see the collection has been dropped and
The user would still need to refresh all nodes' routing caches to get correct targeting for reads after movePrimary, since reads can succeed even if the collection doesn't exist. Not saying we should necessarily implement this (that is, extend the movePrimary critical section), but it's an interesting idea. |
| Comment by Kaloian Manassiev [ 05/Mar/19 ] |
|
How is this different than all the other issues that exist with movePrimary, such as inserts into unsharded collections ( |