Handle duplicate index in resharding building-index phase

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Repl 2023-06-26, Repl 2023-07-10
    • 41
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      If failover happens during building-index phase, the new primary will try starting all the indexes and will fail the resharding if the old primary has already created the index entries in IndexCatalog. We should catch and handle this case by either removing existed indexSpec before calling startIndexBuild or catch the IndexAlreadyExist error.
      We should also add a jstest to catch this case.

            Assignee:
            Jiawei Yang
            Reporter:
            Jiawei Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: