$majorityConfig incorrectly calculated for reconfig config commitment

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • v8.2, v8.0, v7.0
    • Repl 2026-02-16, Repl 2026-03-02, Repl 2026-03-16
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      $majorityConfig is a custom write concern used for reconfig that is supposed to ensure that the current config, C, must be installed on at least a majority of voting nodes in C. This prevents a scenario where a config prior to C can independently elect a new primary and commit a write.

      However, we are incorrectly calculating the config majority here. We should just be using _majorityVoteCount. That code calculates the majority incorrectly for any set >= 4 members (for 4 and 5 nodes, majority is calculated as 2 instead of 3).

            Assignee:
            Pavithra Vetriselvan
            Reporter:
            Aitor Esteve Alvarado
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: