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

--fastsync + rs.add() allows for inconsistent data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.9.1
    • Component/s: Replication
    • Labels:
      None
    • Operating System:
      ALL

      Description

      The attached script can be run on a single instance for ease of reproduction. Script is complex, basic premise below.

      Basic Repro
      ======
      (a) Start replica set nodes with --fastsync and slightly different data
      (b) Configuring with rs.init(cfg) => fails
      (c) Configuring with rs.init() + rs.add(...) + rs.add(...) => succeeds

      Problem #1
      ======
      Step (b) is failing with the following message.
      This does not jive with the fact that I can add them one at a time.
      {
      "errmsg" : "couldn't initiate : member localhost:6901 has data already, cannot initiate set. All members except initiator must be empty.",
      "ok" : 0
      }

      Also, I have --fastsync on. Why can't I start a replica set with known good data?

      Problem #2
      ======
      Step (c) is actually succeeding even though the data is different.

      Expected resolutions
      ======
      #1: Consistency.
      The following two should behave the same:
      1. rs.init( [a,b,c] )
      2. rs.init( [a] ), rs.reconfig( [a,b] ), rs.reconfig( [a,b,c] )

      Both of these should fail if the data does not match.

      #2: Bring up new sets with existing data.
      If [a,b,c] have the same data files, then rs.init( [a,b,c] ) should work.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kristina Kristina Chodorow (Inactive)
              Reporter:
              gatesvp Gaetan Voyer-Perrault
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: