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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4.0-rc7, 4.7.0
    • Component/s: Index Maintenance
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Sprint:
      Execution Team 2020-05-18, Execution Team 2020-06-01
    • Linked BF Score:
      19

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gregory.wlodarek Gregory Wlodarek
              Reporter:
              gregory.wlodarek Gregory Wlodarek
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: