Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-95013

Incorrect index built for timeseries measurement field through moveCollection.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • ALL
    • v8.0
    • Execution Team 2024-09-30

      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.

       

      reprotimeseriesmove.js

      (Note: you will have to run this with the featureFlagReshardingForTimeseries flag enabled)

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            kshitij.gupta@mongodb.com Kshitij Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: