One of our mongodb instance shows incorrect oplog info as below:
rs.printReplicationInfo()
configured oplog size: 200000MB
log length start to end: 113778secs (31.61hrs)
oplog first event time: Sun Jan 07 2018 16:05:39 GMT+0800 (CST)
oplog last event time: Mon Jan 08 2018 23:41:57 GMT+0800 (CST)
now: Tue Dec 08 2020 10:11:51 GMT+0800 (CST)
as we can see now is Tue Dec 08 2020 10:11:51 GMT+0800 (CST) ,but oplog last event time is of year 2018,
to confirm that new events is late than 2018, I insert new data, and the re-check, but last event time is still 2018
use hunter_test
switched to db hunter_testdb.myNewCollection1.insertOne( { x: 1 } )
{
“acknowledged” : true,
“insertedId” : ObjectId(“5fceeb33c58ff57252427d4a”)
}
db.myNewCollection1.find()
{ “_id” : ObjectId(“5fceeb33c58ff57252427d4a”), “x” : 1 }
rs.printReplicationInfo()
configured oplog size: 200000MB
log length start to end: 113778secs (31.61hrs)
oplog first event time: Sun Jan 07 2018 16:05:39 GMT+0800 (CST)
oplog last event time: Mon Jan 08 2018 23:41:57 GMT+0800 (CST)
now: Tue Dec 08 2020 10:56:05 GMT+0800 (CST)
what’s wrong with this instance and how to fix?