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

w:majority issues with votes

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
    • ALL

      If you have a weird distribution of votes in a system, you can have a situation where a write succeeds with w:majority but disappears after a failover. For example:

      { _id : "myrs",
        members : [ { _id : "0", host : "A", votes: 1 },
                    { _id : "1", host : "B", votes: 1 },
                    { _id : "2", host : "C", votes: 3 } ] }

      Suppose w:majority write reaches "A" and "B" but not "C", so the client gets the confirmation; and then "A" and "B" both fail simultaneously. "C" will elect itself primary, but not have the write.

      If the goal of w:majority is to give people the guarantee that the write will remain despite any failure that nonetheless leaves the replica set with a primary, then w:majority should be vote-aware.

      Alternatively, we should get rid of votes.

      EDIT: We will be deprecating member votes that are not 0 or 1.

            milkie@mongodb.com Eric Milkie
            richard.kreuter Richard Kreuter (Inactive)
            10 Vote for this issue
            11 Start watching this issue