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

Secondary syncs to another secondary that has slaveDelay > 0

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.6, 2.1.1
    • Affects Version/s: 1.8.4, 2.0.2
    • Component/s: Replication
    • None
    • ALL

      I have this replset:

      {
      "_id" : "myReplSet",
      "version" : 9,
      "members" : [

      { "_id" : 0, "host" : "a1.serv:27017" }

      ,

      { "_id" : 1, "host" : "s1.serv:27017", "priority" : 0, "slaveDelay" : 10800, "hidden" : true }

      ,

      { "_id" : 2, "host" : "a2.serv:27017" }

      ]
      }
      a1.serv ist primary atm.
      when a2.serv starts the log says:

      Tue Jan 24 10:59:40 [rsStart] replSet STARTUP2
      Tue Jan 24 10:59:40 [rsSync] replSet SECONDARY
      Tue Jan 24 10:59:42 [rsHealthPoll] replSet member a1.serv:27017 is up
      Tue Jan 24 10:59:42 [rsHealthPoll] replSet member a1.serv:27017 is now in state PRIMARY
      Tue Jan 24 10:59:42 [rsHealthPoll] replSet member s1.serv:27017 is up
      Tue Jan 24 10:59:42 [rsHealthPoll] replSet member s1.serv:27017 is now in state SECONDARY
      Tue Jan 24 10:59:46 [rsSync] replSet syncing to: s1.serv:27017

      The only solution right now seems to remove slaveDelay for s1.serv.

      How it should be: if a secondary in a replset searches for a peer to sync it should exclude peers that have a slaveDelay higher than itself.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            ahofmann Ansgar Hofmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: