Retract commit quorum vote on restarting two-phase index build

XMLWordPrintableJSON

    • Storage Execution
    • Storage Execution 2026-08-17
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Once a node votes to commit a two-phase index build, that vote is not removed, even if the node (primary or secondary) dies and needs to restart the index build from scratch. 

      The situation is particularly an issue on an unclean shutdown after voting, as there is no possibility of resuming the index build in that case.  This means that the primary may commit the index before the node restarting the index build has a chance to catch up.  While removing the vote after restart does not prevent the primary from moving to commit while the voting node is still down (or restarting), it can help to reduce the possible cases in which the primary can commit the index before the restarting node is ready.

      In order to retract the vote, a new server command will need to be added similar to voteCommitIndexBuild, I.e.

      {
      	retractCommitIndexBuild: <index_build_uuid>,
      	hostAndPort: "host:port",
      }
      

      Support for this command will also need to be version-gated, as well as handled in such a way that a node attempting to retract its vote can properly deal with a CommandNotFound error in the case that the primary doesn't support it.

      This retraction attempt should be referenced in the log message introduced in SERVER-127740 (and it should use the value read from the config db's system.indexBuilds collection).

            Assignee:
            Alex Sarkesian
            Reporter:
            Alex Sarkesian
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: