Stepdown hook needs to handle stepup race

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2023-03-06
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It appears the continuous stepdown hook can get in a situation where

      1) It steps up a secondary.

      2) The secondary becomes primary, but is slow to get all the way to writable primary (e.g. due to catch-up)

      3) The hook steps up another secondary

      4) Election fails

      5) The hook goes to step up the original primary, which is fine (it's already primary).

      6) The primary finishes catch-up, and steps down due to the term change.

      7) We're now without a primary until election timeout expires. (very bad with high election timeout).

      We should also add logging to the hook so all these steps are visible.

            Assignee:
            Jiawei Yang
            Reporter:
            Matthew Russotto (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: