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

Use high election timeout in replmonitor_bad_seed.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2024-08-19
    • 0

      Post SERVER-79734, on restart, replset.startSet() will stepUp the first electable node as the new primary. As seen in BF-34320, this is causing "election failed" errors because by that time stepUp is called, the replset already ran an election and elected a new primary. More details in the linked bf. 

      We should only trigger the stepUp on restart if the replset doesn't currently have a primary.

      This test does a write after a restart, and in cases where restarting the first node in the set happens to take 10+ seconds and an election occurs on its own before restartSet() steps up a node that isn't already the primary, mongos can end up with an outdated view of the replica set's primary node, causing a subsequent non-retry able write to fail. Since this test is sensitive to unplanned elections, we should use a high election timeout to prevent those.

            Assignee:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Reporter:
            kruti.shah@mongodb.com Kruti Shah
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: