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

Merging replica sets with replication protocol version 1 may result in two primaries

    • Fully Compatible
    • ALL
    • Hide

      1. Create a replica set with at least two members, using rs.initiate().
      2. Create another replica set with a single member with the same name as (1), using rs.initiate().
      3. rs.add() the PRIMARY of (2) to the replica set (1).
      4. rs.status() on (1) shows two PRIMARY.

      Note: two_primaries.js jstest is attached.

      Show
      1. Create a replica set with at least two members, using rs.initiate(). 2. Create another replica set with a single member with the same name as (1), using rs.initiate(). 3. rs.add() the PRIMARY of (2) to the replica set (1). 4. rs.status() on (1) shows two PRIMARY. Note: two_primaries.js jstest is attached.
    • Repl F (01/29/16), Repl 10 (02/19/16)

      In replication protocol version 1, it is possible to create a replica set with two primaries by creating two replica sets with the same name and adding the primary of one set to the other set.

      Any write to the set at this state was done to one of the primaries. However, attempt to restart the set may show data corruption error. Error message is:

      [rsBackgroundSync] Fatal assertion 28723 UnrecoverableRollbackError need to rollback, but unable to determine common point between local and remote oplog: NoMatchingDocument RS101 reached beginning of local oplog [2] @ 18752

      This issue does not happen with protocol version 0.

        1. two_primaries.js
          0.8 kB
          Kevin Adistambha

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            kevin.adistambha@mongodb.com Kevin Adistambha
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: