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

Replica sets with more than 1 node but 1 voting node should have faster elections

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Replication

      We have special code to have prompt elections when there is one replica set member. It would make sense for this code to also exist in replica sets with one voting member.

      We also don't always report the right reason for running for election in this case like here where we call it a kElectionTimeout rather than a kSingleNodePromptElection.

      We would also need to look at:
      https://github.com/mongodb/mongo/blob/2070d8ca09576b858c61677bc366a25e7ecfecad/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp#L892
      https://github.com/mongodb/mongo/blob/ec44fef95a3e7a6620df1ff67796b9d4566aeecb/src/mongo/db/repl/replication_coordinator_impl.cpp#L2925

      I'm not sure how common this use case is though.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: