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

listIndexes fails on invalid pre-5.0 index spec after upgrade

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 5.0.4
    • 6.1.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • v6.0, v5.3, v5.0
    • Execution Team 2022-04-18, Execution Team 2022-05-02

    Description

      Invalid index options, such as specifying "sparse" as a string rather than a boolean,  may have been created in the past, before the createIndexes command started validating options more strictly.

      In MongoDB 5.0, the listIndexes command more strictly validates index options, and fails when an invalid option is encountered. At this point, the only option is to drop and recreate the index.

      This is a variation on the problem addressed in SERVER-59805, which detects fields that are not expected in an index spec. This ticket is about index specs with known fields but unexpected value types not allowed in the IDL definition.

      Attachments

        Issue Links

          Activity

            People

              yuhong.zhang@mongodb.com Yuhong Zhang
              benety.goh@mongodb.com Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: