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

Natural hints no longer work on TS collections when featureFlagTimeseriesMetricIndexes is enabled

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: 5.3.0-rc0
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Hide
      1. Create a Timeseries Collection on 5.3 rc0
      2. Run a query with a nautral hint: find().hint({$natural: 1})
      3. Observe error: "error processing query: ns=test.system.buckets.Collection0Tree: $and\nSort: {}\nProj: {}\nCollation: { locale: \"simple\" }

        \n planner returned error :: caused by :: hint provided does not correspond to an existing index"

      Show
      Create a Timeseries Collection on 5.3 rc0 Run a query with a nautral hint: find().hint({$natural: 1}) Observe error: "error processing query: ns=test.system.buckets.Collection0Tree: $and\nSort: {}\nProj: {}\nCollation: { locale: \"simple\" } \n planner returned error :: caused by :: hint provided does not correspond to an existing index"
    • QO 2022-04-04, QO 2022-04-18

      Hinting $natural on a Timeseries collection no longer works. It appears a recent commit may have broke this functionality. Hinting $natural should always correspond to the clustered index which is built at collection create for a Timeseries collection and all the versions tested below show the clustered index as true in listCollections which is expected, yet the error observed in 5.3 rc0 and latest, 6.0.0-alpha-8-gaba3de6 refers to no index being created

      Testing the above steps on 5.2 correctly work as expected and do not produce an error. However, testing on the latest and 5.3 rc0 produces the error. The offending commit seems to have been introduced sometime between 5.2 and 5.3 rc0

      Once we correct the issue we should add a test for this case

            Assignee:
            david.percy@mongodb.com David Percy
            Reporter:
            michael.gargiulo@mongodb.com Michael Gargiulo
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: