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

Allow primary-elect to complete drain mode even if it is stepping down unconditionally

    • Fully Compatible
    • ALL
    • v4.4, v4.2, v4.0
    • Repl 2020-07-27, Repl 2020-08-10

      We call ReplicaSetAwareServiceRegistry::onStepUpComplete and ReplicationCoordinatorExternalState::onTransitionToPrimary before calling _topCoord->completeTransitionToPrimary, which can fail.

      If it does fail, we don't seem to take any action to inform the external services we just told we were now primary that we actually no longer are.

       

      To resolve this, we will allow nodes to complete drain mode, even if their action is set to kSteppingDown. This will let us invariant on the second check, instead of returning a Status.

            Assignee:
            xuerui.fa@mongodb.com Xuerui Fa
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: