[SERVER-46386] Refining a shard key may lead to an orphan range never being cleaned up Created: 25/Feb/20 Updated: 29/Oct/23 Resolved: 13/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Matthew Saltz (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||||||||||
| Steps To Reproduce: | Apply server42192.patch
|
||||||||||||||||||||||||
| Sprint: | Sharding 2020-03-09, Sharding 2020-03-23 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
The config.rangeDeletions collection stores a document of the following form to track range deletion tasks needing to be performed:
The "range" field of this document is left unmodified after a user has successfully run the refineCollectionShardKey command. This means if the following sequence of events occurs, then a "RangeOverlapConflict: Requested deletion range overlaps a live shard chunk" error will prevent the range deleter from ever deleting the range of orphan documents.
|
| Comments |
| Comment by Githook User [ 30/Mar/20 ] |
|
Author: {'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}Message: (cherry picked from commit 46b4b3d8f03e3dfc3ca2ae344bf7848732e986c3) |
| Comment by Githook User [ 13/Mar/20 ] |
|
Author: {'username': 'saltzm', 'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com'}Message: |
| Comment by Max Hirschhorn [ 25/Feb/20 ] |
|
It is unknown to me if there may be other situations where ChunkManager::rangeOverlapsShard() or RoutingTableHistory::overlappingRanges() are called with a ChunkRange that has a shape from prior to the refinement of the shard key. I'd imagine those to be similarly problematic if there are any such places. |