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

Startup recovery should work with more than one unfinished two-phase index build

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc0, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-03-23, Execution Team 2020-04-06
    • 50

      Startup recovery for unfinished index builds first drops each index from the durable catalog before restarting the index build.

      The recovery procedure then initializes the collection's in-memory state with Collection::init(). This also initializes the IndexCatalog, which invariants that all indexes in the durable catalog are ready.

      If there is more than one unfinished index build, separate calls will be made to initialize the IndexCatalog for each build. The first call will fail on this invariant, because the second index has not been dropped yet.

      Fixing this is tricky, because both the Collection and IndexCatalog can only be initialized once, and index builds need to be started in separate threads. Additionally, dropping and recreating indexes need to be part of the same storage transaction.

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: