[SERVER-54984] Relax invariant in ReshardingOpObserver about temporary resharding collection being sharded Created: 05/Mar/21 Updated: 06/Nov/23 Resolved: 12/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Yuhong Zhang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-234-M2.5, PM-234-T-data-clone | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Sprint: | Sharding 2021-03-22 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 153 | ||||||||||||||||||||||||
| Story Points: | 1 | ||||||||||||||||||||||||
| Description |
|
It is technically possible for a user to manually create a "system.resharding." collection that isn't sharded. The invariants in ReshardingOpObserver::onInserts() and ReshardingOpObserver::onUpdate() should be changed to a uassert(ErrorCodes::NamespaceNotSharded, ..., metadata && metadata->isSharded()) to avoid crashing the server in such a situation. |
| Comments |
| Comment by Githook User [ 11/Mar/21 ] |
|
Author: {'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}Message: |