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

listIndexes fails on invalid pre-5.0 index spec after upgrade

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0, 5.0.25, 6.0.14
    • Affects Version/s: 5.0.4
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • v6.0, v5.3, v5.0
    • Execution Team 2022-04-18, Execution Team 2022-05-02

      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.

            yuhong.zhang@mongodb.com Yuhong Zhang
            benety.goh@mongodb.com Benety Goh
            0 Vote for this issue
            9 Start watching this issue