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

Cannot set "initialSync" replica set config

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

      Attempting to reconfigure a replica set with the initialSync config options doesn't work.

      david@rs1a ~: ./console
      MongoDB shell version: 1.7.5
      connecting to: localhost:27018/test
      set1:PRIMARY> cfg = rs.conf()
      {
      "_id" : "set1",
      "version" : 8,
      "members" : [

      { "_id" : 0, "host" : "rs1a:27018" }

      ,

      { "_id" : 1, "host" : "rs1b:27018" }

      ,

      { "_id" : 3, "host" : "rs1arbiter:27018", "arbiterOnly" : true }

      ,

      { "_id" : 4, "host" : "rs1c:27018", "priority" : 0, "hidden" : true }

      ,

      { "_id" : 5, "host" : "rs1d:27018", "priority" : 0, "slaveDelay" : 7200, "hidden" : true }

      ]
      }
      set1:PRIMARY> cfg.members[0].initialSync =

      {state: 2} { "state" : 2 }

      set1:PRIMARY> cfg.members[1].initialSync =

      {state: 2} { "state" : 2 }

      set1:PRIMARY> cfg.members[3].initialSync =

      {state: 2} { "state" : 2 }

      set1:PRIMARY> cfg.members[4].initialSync =

      {state: 2} { "state" : 2 }

      set1:PRIMARY> cfg
      {
      "_id" : "set1",
      "version" : 8,
      "members" : [
      {
      "_id" : 0,
      "host" : "rs1a:27018",
      "initialSync" :

      { "state" : 2 }

      },
      {
      "_id" : 1,
      "host" : "rs1b:27018",
      "initialSync" :

      { "state" : 2 }

      },

      { "_id" : 3, "host" : "rs1arbiter:27018", "arbiterOnly" : true }

      ,
      {
      "_id" : 4,
      "host" : "rs1c:27018",
      "priority" : 0,
      "hidden" : true,
      "initialSync" :

      { "state" : 2 }

      },
      {
      "_id" : 5,
      "host" : "rs1d:27018",
      "priority" : 0,
      "slaveDelay" : 7200,
      "hidden" : true,
      "initialSync" :

      { "state" : 2 }

      }
      ]
      }
      set1:PRIMARY> rs.reconfig(cfg)
      Sat Feb 5 07:56:32 DBClientCursor::init call() failed
      Sat Feb 5 07:56:32 query failed : admin.$cmd { replSetReconfig: { _id: "set1", version: 9, members: [ { _id: 0, host: "rs1a:27018", initialSync:

      { state: 2.0 }

      }, { _id: 1, host: "rs1b:27018", initialSync:

      { state: 2.0 }

      },

      { _id: 3, host: "rs1arbiter:27018", arbiterOnly: true }

      , { _id: 4, host: "rs1c:27018", priority: 0.0, hidden: true, initialSync:

      { state: 2.0 }

      }, { _id: 5, host: "rs1d:27018", priority: 0.0, slaveDelay: 7200, hidden: true, initialSync:

      { state: 2.0 }

      } ] } } to: localhost:27018
      shell got exception during reconfig: Error: error doing query: failed
      in some circumstances, the primary steps down and closes connections on a reconfig
      null
      Sat Feb 5 07:56:32 trying reconnect to localhost:27018
      Sat Feb 5 07:56:32 reconnect localhost:27018 ok
      set1:SECONDARY> rs.conf()
      {
      "_id" : "set1",
      "version" : 9,
      "members" : [

      { "_id" : 0, "host" : "rs1a:27018" }

      ,

      { "_id" : 1, "host" : "rs1b:27018" }

      ,

      { "_id" : 3, "host" : "rs1arbiter:27018", "arbiterOnly" : true }

      ,

      { "_id" : 4, "host" : "rs1c:27018", "priority" : 0, "hidden" : true }

      ,

      { "_id" : 5, "host" : "rs1d:27018", "priority" : 0, "slaveDelay" : 7200, "hidden" : true }

      ]
      }

            Assignee:
            kristina Kristina Chodorow (Inactive)
            Reporter:
            boxedice David Mytton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: