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

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: