Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2645

Check for duplicate index keys after converting legacy index definitions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 100.1.1
    • Component/s: mongorestore
    • Labels:
      None

      Description

      If a dump has two indexes, {foo: ""} and {foo: 1}, and we restore with --convertLegacyIndexes, then we will get an error: 

      (IndexOptionsConflict) Index with name: foo_1 already exists with a different name

      We could check to see if we have duplicate indexes after legacy index conversion and discard the legacy index, or we could just ignore the error.

      Both options would have the effect of removing the legacy index. This would mean that index hints for that index would no longer work in the restored db.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              huan.li Huan Li
              Reporter:
              tim.fogarty Tim Fogarty
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: