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

SECONDARY in RECOVERING state after a resync

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: 2.4.4
    • Fix Version/s: None
    • Component/s: Replication, Sharding
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      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.

      Description

      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?

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: