[SERVER-24360] opdate higher in secondary Created: 02/Jun/16 Updated: 14/Jul/16 Resolved: 20/Jun/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 2.6.8 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Trivial - P5 |
| Reporter: | adrian | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
I am using this check https://github.com/mzupan/nagios-plugin-mongodb/blob/master/check_mongodb.py to monitor replication lag between nodes in a replica set. From time to time I have observed big lags between nodes (> 1000s).
The node executing the check: Primary node: So lag is -451s! Both nodes are ntp synced. |
| Comments |
| Comment by Ramon Fernandez Marina [ 20/Jun/16 ] |
|
adrianlzt, please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. Questions involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources. Regards, |
| Comment by adrian [ 02/Jun/16 ] |
|
But the info about primary is: With this data I understant that secondary have received info about primary at 09:12:37Z, but optime wasn't updated. Anyways, I have improved the script to collect data so it ssh in every host and print the state. Thanks for the clarifitacion about the view of rs.status |
| Comment by Eric Milkie [ 02/Jun/16 ] |
|
The output of the replSetGetStatus command is the data about the set from the point of view of the node where you are running the command; it is not an atomic point in time across all nodes. There is, in fact, no way to atomically query all nodes in a replica set at an exact moment in time, so there isn't a way to calculate lag exactly at any moment in time. |