After SERVER-89744
moveCollection will explicitly attach a simple locale to the index spec before passing it off to index builds coordinator to start an index build. I have attached a repro here. In the repro, moveCollection logs the following index spec that it passes to IndexBuildsCoordinator:
[js_test:test] d20043| { v: 2, key: { control.min.x: 1.0, control.max.x: 1.0 }, name: "x_1", originalSpec: { key: { x: 1.0 }, name: "x_1", v: 2 }, collation: { locale: "simple" } }
This spec has the simple collation. But the x_1 index that is seen after resharding has the collection default collation. This only happens for unsharded timeseries collections (that are moved with moveCollection) and when the index is on a measurement field. (i tested with `meta.x` and things to seemed to work correctly).
Either moveCollection is passing the collation in a way that is incorrect (please let me know if this behaviour is expected and this is something special with a timeseries collection) or this is a bug.
moveCollection on timeseries collections is not shipping with 8.0 and I didn't see this behaviour on moveCollection with non-timeseries collection. I would appreciate if this was prioritized so that we can make sure that is actually the case since moveCollection with non-timeseries collection ships with 8.0.
(Note: you will have to run this with the featureFlagReshardingForTimeseries flag enabled)
- is depended on by
-
SERVER-93149 Re-enable reshardingForTimeseriesFeatureFlagEnabled
- Closed
- is related to
-
SERVER-95135 Enforce that originalSpec has same collation as outer spec when creating index
- In Code Review
-
SERVER-89744 Resharding incorrectly builds {locale: "simple"} secondary indexes with collection's non-"simple" default collation
- Closed