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

XMLWordPrintableJSON

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

      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
            Reporter:
            Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: