-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.6.2
-
Component/s: None
-
None
-
ALL
Problem:
Customer had accidentally set the clocktime of a secondary member of a replicate set to a date in 2030.
When they performed a rs.status() they saw
rs.status()
{
"set" : "set1",
"date" : "Sat Sep 21 2030 14:15:14 GMT+0000 (UTC)",
"myState" : 2,
"members" : [
,
{ "_id" : 1, "name" : "rs1b:27018", "health" : 1, "state" : 2, "self" : true } ],
"ok" : 1
}
The date being reported was "Sat Sep 21 2030 14:15:14 GMT+0000 (UTC)" (date and last hearbeat), which was the clocktime set on the machine.
However, looking further into the issue there seems to be a difference in what was being recording. A query to db.slaves.find() gave
{ "_id" : ObjectId("4c8e86f0c2aec46f3455b99a"), "host" : "10.121.14.4", "ns" : "local.oplog.rs", "syncedTo" :
{ "t" : 1285085434000, "i" : 30 }}
The syncedTo of 1285085434000 equals
Tue Sep 21 2010 09:10:34 GMT-0700 (PDT)
Workaround:
To correct the problem
- shutdown mongo on the secondary with the wrong clock time
- change the clock time
- restart mongod
Solution:
It appears that rs.status() is reporting the clocktime on the node its run but db.slaves.find() reports the clocktime on the master.
Business Case:
User Experience