[SERVER-85524] Re-enable analyze_shard_key_database_and_shard_versioning.js targeting secondaries node Created: 22/Jan/24  Updated: 25/Jan/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Enrico Golfieri Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-81461 Change tests that uses movePrimary to... In Code Review
Problem/Incident
is caused by SERVER-79668 Move primary must be compatible with ... Closed
Assigned Teams:
Catalog and Routing
Operating System: ALL
Participants:

 Description   

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.

 


Generated at Thu Feb 08 06:57:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.