[SERVER-57641] Legacy renameCollection may proceed renaming a sharded collection Created: 11/Jun/21 Updated: 29/Oct/23 Resolved: 15/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 5.0.0-rc1 |
| Fix Version/s: | 5.0.0-rc3, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jordi Serra Torrens | Assignee: | Jordi Serra Torrens |
| 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: |
v5.0
|
||||||||
| Sprint: | Sharding EMEA 2021-06-28 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 120 | ||||||||
| Description |
|
The legacy-path renameCollection must fail if either the source or the destination collections are sharded. There is a situation where after a shardCollection operations has completed writing the config.chunks and config.collections documents, but then steps down before refreshing the filtering metadata, where the new primary may be left with filtering metadata as unsharded. Under that scenario, a legacy-path rename may succeed in renaming a sharded collection. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 16/Jun/21 ] |
|
Author: {'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}Message: (cherry picked from commit d5ab25a22cdfd7d60aedae5fb3e455502e330bdb) |
| Comment by Githook User [ 15/Jun/21 ] |
|
Author: {'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}Message: |
| Comment by Jordi Serra Torrens [ 11/Jun/21 ] |
|
kaloian.manassiev no, most likely this situation exists prior to 5.0 |
| Comment by Kaloian Manassiev [ 11/Jun/21 ] |
|
jordi.serra-torrens, this is not something new to 5.0, right? |
| Comment by Jordi Serra Torrens [ 11/Jun/21 ] |
|
To address this, in legacy-rename, instead of assessing if the collections are sharded using the CollectionShardingState, we could do it by refreshing and checking the catalog metadata from the configsvr. |