[SERVER-1823] db.slaves.find() and rs.status() reporting different values of date of last sync Created: 21/Sep/10 Updated: 12/Jul/16 Resolved: 16/Jan/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.6.2 |
| Fix Version/s: | 1.7.4 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Alvin Richards (Inactive) | Assignee: | Dwight Merriman |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
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() , { "_id" : 1, "name" : "rs1b:27018", "health" : 1, "state" : 2, "self" : true } ], 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 Workaround:
Solution: Business Case: |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 16/Jan/11 ] |
|
we added sync time to rs.status() |
| Comment by Dwight Merriman [ 22/Sep/10 ] |
|
i need to make status show how up to date a node is lastheartbeat is last time it checked 'are you alive' and does not reflect its data freshness |
| Comment by Alvin Richards (Inactive) [ 21/Sep/10 ] |
|
Reproduce:
|