-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 5.0.0, 6.0.0, 7.0.0, 8.0.0-rc1
-
Component/s: None
-
Catalog and Routing
-
ALL
-
CAR Team 2024-01-08, CAR Team 2024-01-22, CAR Team 2024-02-05, CAR Team 2024-02-19, CAR Team 2024-03-04
-
(copied to CRM)
-
2
refineCollectionShardKey can be called on a time-series collection to change the shardKey from {metaField: 1} to {metaField: 1, timeField: 1}. However, we hit this error when trying to do so. When we compare the old key and the new key the old key is correctly rewritten for a time-series collection, but the new key is not rewritten, leading to the error. There is an example of this error in the comments.
We do have a test that covers this case, but it did not show up in testing, because the tests have the metaField named "meta", so we didn't catch the error where we are not rewriting the shardKey. The test is here and should avoid using "meta" as the metaField name. We noticed this while investigating SERVER-77112.
- is depended on by
-
SERVER-85243 Add FCV upgrade/downgrade test for shardCollection creating the updated buckets index on the timeField
- Blocked
-
SERVER-84682 Create a new version of refineCollectionShardKey to ensure consistent shard key index creation across FCV transitions
- Closed
- is duplicated by
-
SERVER-89056 refineCollectionShardKey does not translate metaField
- Closed
- is related to
-
SERVER-77112 shardCollection and createIndex create different indexes on time-series buckets collections
- Closed
- related to
-
SERVER-84741 Ensure the shard key is rewritten for the buckets collection when calling validateShardKeyIndexExistsOrCreateIfPossible
- Closed