-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 8.0.0-rc0, 7.3.0
-
Component/s: None
-
None
-
Catalog and Routing
-
ALL
-
CAR Team 2024-04-01, CAR Team 2024-04-15, CAR Team 2024-04-29, CAR Team 2024-05-13, CAR Team 2024-05-27, CAR Team 2024-06-10
-
111
-
1
Sample scenario for repro
In a n-sharded cluster, an empty collection targeted with a createCollection({key: hashed}) should produce a routing table with the following chunk distribution:
- if gOneChunkPerShardEmptyCollectionWithHashedShardKey is enabled (>= 7.2), n chunks and 1 chunk per shard
- if gOneChunkPerShardEmptyCollectionWithHashedShardKey is not enabled (<7.2), 2*n chunks and 2 chunks per shard
The logic is nevertheless flawed: the feature flag is queried multiple times during the generation of the routing table - and its value may be unstable across reads. As a consequence of this, we might end up in a state where shardCollection generates n chunks (feature flag on) but only distributes them across n/2 shards (feature flag off) when the DDL is executed concurrently with a FCV downgrade.
- is caused by
-
SERVER-82611 Remove the 'numInitialChunks' parameter from the initial split policies for shardCollection
- Closed
- is related to
-
SERVER-91517 Catalog and Routing: Audit feature flag checks for unsafe races with setFCV (subtask 4)
- Closed