[SERVER-83277] Always attach db version when loading indexes from the authoritative shard Created: 15/Nov/23  Updated: 16/Nov/23  Resolved: 16/Nov/23

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

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Backlog - Catalog and Routing
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Catalog and Routing
Operating System: ALL
Participants:

 Description   

The loadIndexesFromAuthoritativeShard helper currently assumes that if a collection has a routing table it is enough to just check for the shard version on the shard receiving the listIndexes command.

Since we're starting tracking unsharded collections on the sharding catalog (with a 1-chunk routing table), this path will be taken also for unsharded collections. This is going to trigger errors when a movePrimary happens because the db version changes but not the shard version, hence we may target the old primary and not find the necessary indexes.



 Comments   
Comment by Pierlauro Sciarelli [ 16/Nov/23 ]

Closing because we've decided not to work further on supporting a feature that will never be exposed to users (movePrimary moving tracked unsplittable collections).

Comment by Jordi Serra Torrens [ 15/Nov/23 ]

Note: The behavior of loadIndexesFromAuthoritativeShard is correct and consistent with the shardVersioning protocol. Reads and writes use the same protocol. The real problem might be related to how movePrimary has been made to move tracked collections.

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