-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 5.0.0, 6.0.0, 6.3.2, 7.0.0-rc7
-
Component/s: Sharding
-
Catalog and Routing
-
ALL
-
-
Sharding EMEA 2023-09-18, Sharding EMEA 2023-10-02, Sharding EMEA 2023-10-16, Sharding EMEA 2023-10-30, CAR Team 2023-12-25, CAR Team 2024-01-08, CAR Team 2024-01-22, CAR Team 2024-04-01
-
2
SERVER-60144 added functionality to check the shard version of a time series collection by assigning the bucket NamespaceString to the operation sharding state, however, in a read path the following interleaving might happen:
- A sharded timeseries collection with namespace db.coll is created successfully
- A read comes into the shard for the timeseries collection and the shard role is set in the OperationShardingState, notice that because it is a timeseries, the namespace is transformed from db.coll to db.system.buckets.coll
- A drop collection and a shard collection gets executed, successfully dropping and creating a new sharded collection with namespace db.coll
- The read path continues, selecting a filtering phase
- When trying to obtain the ownership filter, we find that there is no shard version set for the collection db.coll in the operation context, so we fail the command with a tassert
Causing the read to fail. Usually on the find path, once it is detected the collection is actually a view (because timeseries collections are actually views), the read is transformed to an aggregation, but because a new sharded collection was created in step 3, the read continues as normal.
We should find a way to check the shard version in the read path, in order to determine whether the collection still exists before acquiring the lock free raii.
- duplicates
-
SERVER-82075 shard_role:acquireCollection can trip invariant when placementConcern has dbVersion but no shardVersion
- Closed
-
SERVER-77507 Integrate acquisitions into Find
- Closed
- is caused by
-
SERVER-60144 Handle stale routing info on mongos for sharded time-series collections
- Closed
- is related to
-
SERVER-80719 Review timeseries name disambiguation in sharded clusters
- Backlog
-
SERVER-80715 New refine collection shard key might try to access invalid collection object
- Closed