[SERVER-50750] Refining shard key to include nested field causes "Error refreshing cached collection" on shard primaries Created: 03/Sep/20 Updated: 29/Oct/23 Resolved: 14/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.4.0 |
| Fix Version/s: | 4.8.0, 4.4.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jack Mulrow | Assignee: | Jack Mulrow |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | KP44 | ||
| 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
|
||||||||||||||||||||||||
| Sprint: | Sharding 2020-09-21 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||
| Description |
|
If a shard key is refined (using refineCollectionShardKey) to include a nested field (e.g. key {a: 1} is refined to be {a: 1, "b.c": 1}), the resulting chunk boundaries will include nested documents, which is not a valid format. This causes future metadata refreshes to fail, with shard primaries logging "Error refreshing cached collection" messages like:
refineCollectionShardKey should create boundaries with dotted field names instead of nested documents. It is possible to manually correct chunk and zone range metadata, but currently the best course of action is to avoid using refineShardKey to incorporate a nested field into the shard key. A test refining the shard key with a new dotted field has temporarily been commented waiting for this issue to be addressed. |
| Comments |
| Comment by Githook User [ 17/Sep/20 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: |
| Comment by Githook User [ 15/Sep/20 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: |
| Comment by Githook User [ 15/Sep/20 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: (cherry picked from commit 913429ff26d12de4248f42f3fe3543dbb21b2cbb) |
| Comment by Githook User [ 11/Sep/20 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: |