-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
ALL
-
v8.0
-
CAR Team 2024-04-15, CAR Team 2024-04-29, Execution Team 2024-06-24, Execution Team 2024-07-08, Execution Team 2024-07-22, GregsList - 2024-09-03, PopcornChicken - 2024-09-17
-
2
Currently, the validate command does not use the collection acquisition logic provided by the shardRole API. As a result, changes in collection placement can be left undetected, leading to errors in cases where a refresh would be expected. One such example is the scatter-gather inside the cluster validate command which may fail with a NamespaceNotFound error, when it interleaves with a moveCollection.
To prevent the occurrence of such errors, a general solution can be obtained by means of the Shard Versioning Protocol. The ShardVersion is attached to requests that are sent by the router and can be used by the validate command to detect changes in collection placement. If such a change is detected, a StaleConfig exception can be propagated back to the router, with the request being repeated as a result. This behaviour is already implemented as part of the collection acquisition logic within the shard role api.
The goal of this ticket is to adjust the collection acquisition code used by the validate command, such that ShardVersion mismatches are detected.
A reproducer for the expected behaviour can be found here.
- depends on
-
SERVER-94825 Uncommitted fast count updates leak out to other operations
- Closed
-
SERVER-94992 Shard Role acquisitions update read source on secondaries even if they are "writing"
- Closed
- is depended on by
-
SERVER-91396 Complete TODO listed in SERVER-91073
- Blocked
- is duplicated by
-
SERVER-91073 Validate command does not check if a received shard version is stale before proceeding
- Closed
- is related to
-
SERVER-86292 Introduce sharding_jscore_passthrough_with_balancer suite
- Closed
- related to
-
SERVER-86917 Index DDL operations have concurrency issues with validate command
- Closed