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

SECONDARY in RECOVERING state after a resync

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.4
    • Component/s: Replication, Sharding
    • None
    • ALL
    • Hide

      Run reSync operation on a SECONDARY with full-sync after clean-up of data directory.

      Show
      Run reSync operation on a SECONDARY with full-sync after clean-up of data directory.

      We run a resync on SECONDARY on a prod replica. During the process, oplog on secondary was set to 131GB by mongo where as the PRIMARY oplog is only 3GB.

      SECONDARY oplog
      erep:RECOVERING> db.printReplicationInfo()
      configured oplog size: 134152.873828125MB
      log length start to end: 0secs (0hrs)
      oplog first event time: Wed Jul 09 2014 09:12:53 GMT-0600 (MDT)
      oplog last event time: Wed Jul 09 2014 09:12:53 GMT-0600 (MDT)
      now: Thu Jul 10 2014 06:45:30 GMT-0600 (MDT)

      PRIMARY Oplog

      erep:PRIMARY> db.printReplicationInfo()
      configured oplog size: 3181.0236328125MB
      log length start to end: 56786secs (15.77hrs)
      oplog first event time: Wed Jul 09 2014 14:57:31 GMT-0600 (MDT)
      oplog last event time: Thu Jul 10 2014 06:43:57 GMT-0600 (MDT)
      now: Thu Jul 10 2014 06:44:10 GMT-0600 (MDT)

      erep:RECOVERING> rs.status()
      {
      "set" : "erep",
      "date" : ISODate("2014-07-10T15:33:17Z"),
      "myState" : 3,
      "members" : [
      {
      "_id" : 0,
      "name" : "wslermdb01sp:27017",
      "health" : 1,
      "state" : 1,
      "stateStr" : "PRIMARY",
      "uptime" : 87654,
      "optime" :

      { "t" : 1405006395, "i" : 9 }

      ,
      "optimeDate" : ISODate("2014-07-10T15:33:15Z"),
      "lastHeartbeat" : ISODate("2014-07-10T15:33:17Z"),
      "lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
      "pingMs" : 2
      },

      { "_id" : 2, "name" : "wslerudh01sp:27017", "health" : 1, "state" : 7, "stateStr" : "ARBITER", "uptime" : 87654, "lastHeartbeat" : ISODate("2014-07-10T15:33:16Z"), "lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"), "pingMs" : 1 }

      ,
      {
      "_id" : 3,
      "name" : "wslermdb02sp:27017",
      "health" : 1,
      "state" : 3,
      "stateStr" : "RECOVERING",
      "uptime" : 94556,
      "optime" :

      { "t" : 1404918773, "i" : 1 }

      ,
      "optimeDate" : ISODate("2014-07-09T15:12:53Z"),
      "self" : true
      }
      ],
      "ok" : 1
      }

      Question: what is the max oplog size we can use for both and should I make them both 131GB or go higher?

            Assignee:
            Unassigned Unassigned
            Reporter:
            shuchappa@utah.gov Sridhara Huchappa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: