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

adding a node that has been a replset member should clear out the cached state

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.7.8
    • Affects Version/s: 2.2.3
    • Component/s: Replication
    • Labels:
      None
    • Environment:
      ubuntu
    • Fully Compatible

      I set up a replica set with 3 nodes, one acting as arbiter.

      after initializing and adding the hosts, I added the third as a arbiter using rs.addArb(host)

      rs.conf()

      
      

      "_id" : "api",
      "version" : 7,
      "members" : [

      { "_id" : 0, "host" : "minnow-data-1.cloud.appcelerator.com:27017" }

      ,

      { "_id" : 1, "host" : "minnow-data-2.cloud.appcelerator.com:27017" }

      ,

      { "_id" : 2, "host" : "minnow-data-arbiter-1.cloud.appcelerator.com:27017", "arbiterOnly" : true }

      rs.status()

      "set" : "api",
      "date" : ISODate("2013-02-06T23:51:40Z"),
      "myState" : 2,
      "syncingTo" : "minnow-data-2.cloud.appcelerator.com:27017",
      "members" : [

      { "_id" : 0, "name" : "minnow-data-1.cloud.appcelerator.com:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 4884, "optime" : Timestamp(1360189735000, 1), "optimeDate" : ISODate("2013-02-06T22:28:55Z"), "self" : true }

      ,

      { "_id" : 1, "name" : "minnow-data-2.cloud.appcelerator.com:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 4882, "optime" : Timestamp(1360189735000, 1), "optimeDate" : ISODate("2013-02-06T22:28:55Z"), "lastHeartbeat" : ISODate("2013-02-06T23:51:39Z"), "pingMs" : 1 }

      ,

      { "_id" : 2, "name" : "minnow-data-arbiter-1.cloud.appcelerator.com:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 4882, "lastHeartbeat" : ISODate("2013-02-06T23:51:39Z"), "pingMs" : 12 }

      ],
      "ok" : 1

      I would expect the third node to be in state 7 for arbiter.

            Assignee:
            Unassigned Unassigned
            Reporter:
            amorcomb c a morcomb
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: