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

stepdown global lock acqusition should use wait time, not freeze time

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.2, 4.1.2
    • Affects Version/s: None
    • Component/s: Replication
    • Fully Compatible
    • ALL
    • v4.0
    • Repl 2018-07-16, Repl 2018-07-30

      When we added interruptibility to lock acquisitions, we chose the "stepDownUntil" deadline for the global lock acquisition timeout in ReplicationCoordinatorImpl::stepDown(). This unfortunately-named variable is actually the freeze time, which dictates how long a node will wait before attempting to become primary again, after the stepdown has finished and the function has returned.
      Instead, we should be using the "waitUntil" deadline, which is the time the user is willing to wait for the stepdown to complete before it gives up and returns an error.

      This function is used by both the replicaSetStepDown and shutdown commands, and so this bug affects both.

            Assignee:
            vesselina.ratcheva@mongodb.com Vesselina Ratcheva (Inactive)
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: