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

The primary node should use the AsyncDBClient to vote for committing the index build to allow the request to be interrupted by the IndexBuildsCoordinator

    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-05-18, Execution Team 2020-06-01
    • 19

      The primary node will short circuit in the runCmdOnPrimaryAndAwaitResponse if the function is called on the primary itself when voting to commit the index build. However, with the diverging code path, it becomes increasingly more difficult when we have to interrupt the command in the event the commitIndexBuild or abortIndexBuild oplog entry is processed prior to when the node stepped up.

      The IndexBuildsCoordinator setSignalAndCancelVoteRequestCbkIfActive() function only cancels the requests started using the AsyncDBClient and not the requests using the DBDirectClient. Not interrupting the DBDirectClient will cause the voteCommitIndexBuild command to hang indefinitely as witnessed in a build failure.

      To remediate this issue, when the primary node is voting to commit the index build it should use the AsyncDBClient, which has additional networking overhead but the cost of the additional overhead is negligible when looking at the whole index build process.

            gregory.wlodarek@mongodb.com Gregory Wlodarek
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            0 Vote for this issue
            7 Start watching this issue