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

Setting slaveDelay on a sync target should cause syncing members to find a new target.

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.1.2
    • Component/s: Replication
    • None
    • ALL

      Steps to reproduce:

      1. Set secondary A to sync from secondary B
      2. Reconfigure the set such that secondary B has a slaveDelay greater than 10 seconds.

      Secondary A will continue to sync from secondary B with no warnings at all. Consequently secondary A is now also slaveDelayed. In the following example 27019 has been configured to sync to 27018.

      foo:SECONDARY> rs.conf()
      {
      	"_id" : "foo",
      	"version" : 6,
      	"members" : [
      		{
      			"_id" : 0,
      			"host" : "behackett-dt:27017"
      		},
      		{
      			"_id" : 1,
      			"host" : "behackett-dt:27018",
      			"priority" : 0,
      			"slaveDelay" : 200
      		},
      		{
      			"_id" : 2,
      			"host" : "behackett-dt:27019"
      		},
      		{
      			"_id" : 3,
      			"host" : "behackett-dt:27020",
      			"arbiterOnly" : true
      		}
      	]
      }
      foo:SECONDARY> rs.status()
      {
      	"set" : "foo",
      	"date" : ISODate("2012-07-17T00:52:31Z"),
      	"myState" : 2,
      	"syncingTo" : "behackett-dt:27018",
      	"members" : [
      		{
      			"_id" : 0,
      			"name" : "behackett-dt:27017",
      			"health" : 1,
      			"state" : 1,
      			"stateStr" : "PRIMARY",
      			"uptime" : 94,
      			"optime" : Timestamp(1342486334000, 4),
      			"optimeDate" : ISODate("2012-07-17T00:52:14Z"),
      			"lastHeartbeat" : ISODate("2012-07-17T00:52:29Z"),
      			"pingMs" : 0
      		},
      		{
      			"_id" : 1,
      			"name" : "behackett-dt:27018",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 94,
      			"optime" : Timestamp(1342486034000, 1),
      			"optimeDate" : ISODate("2012-07-17T00:47:14Z"),
      			"lastHeartbeat" : ISODate("2012-07-17T00:52:29Z"),
      			"pingMs" : 0,
      			"errmsg" : "syncing to: behackett-dt:27017"
      		},
      		{
      			"_id" : 2,
      			"name" : "behackett-dt:27019",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 1874,
      			"optime" : Timestamp(1342486034000, 1),
      			"optimeDate" : ISODate("2012-07-17T00:47:14Z"),
      			"self" : true
      		},
      		{
      			"_id" : 3,
      			"name" : "behackett-dt:27020",
      			"health" : 1,
      			"state" : 7,
      			"stateStr" : "ARBITER",
      			"uptime" : 94,
      			"lastHeartbeat" : ISODate("2012-07-17T00:52:29Z"),
      			"pingMs" : 0
      		}
      	],
      	"ok" : 1
      }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: