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
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: