-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
ALL
Analyze shard key can be executed against both a primary node or a secondary. This is tested in analyze_shard_key_database_and_shard_versioning where a movePrimary is added before the command is executed to confirm this behaviour is respected also in case the primary shard changes.
However, after SERVER-81190 unsharded collection are registered in the sharding catalog and they are supposed not to be moved by the movePrimary. Due to SERVER-79668 unsplittable collection are actually moved.
This is causing a known issue (SERVER-83277): movePrimary does not bump the shardVersion, causing any stale router to target the old primary without receiving a StaleConfig.
To temporarily bypass this issue, which will be solved as part of SERVER-81141, in SERVER-81190 the mentioned test is skipped in case trackUnsheded is enabled, causing a loss of test coverage. To still leave the command working on primary nodes, the movePrimary currently forces a clean-up of filtering metadata on the primary node, causing a refresh that will update corrently the filtering metadata on the primary.
This ticket should remove the check and enable the test again.
- depends on
-
SERVER-81461 Change tests that uses movePrimary to move data to use moveCollection
- Closed
- duplicates
-
SERVER-81461 Change tests that uses movePrimary to move data to use moveCollection
- Closed
- is caused by
-
SERVER-79668 Move primary must be compatible with unsplittable collections
- Closed