[SERVER-34379] Primary is -1 Sec behind the primary Created: 09/Apr/18  Updated: 27/Oct/23  Resolved: 10/Apr/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Anand Mohan Assignee: Kelsey Schubert
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-10359 rs.printSlaveReplicationInfo() may sh... Closed
Operating System: ALL
Participants:

 Description   

Hi ,

In my environment , Secondary is -1 Sec behind the primary. This is an intermittent issue.
The Data Size in Primary and Secondary also different but maximum time it is in 0 sec behind the primary.

MongoDB Enterprise rs01:SECONDARY> rs.printSlaveReplicationInfo()
source: *************************.com:27017
        syncedTo: Sun Apr 08 2018 23:35:35 GMT-0500 (CDT)
        -2 secs (0 hrs) behind the primary

Please help me in resolve this issue



 Comments   
Comment by Kelsey Schubert [ 10/Apr/18 ]

Hi gg.anands@gmail.com,

Sorry, I'm not sure how I missed that on my first read. In our documentation, we clarify that negative values may be expected in certain cases when run against a secondary. If you're curious, I wrote up an detailed example of how/why this might occur in DOCS-10359, where I requested that we add a note about this confusing behavior. For more accurate view of the cluster health, I would recommend running this command from the primary.

Kind regards,
Kelsey

Comment by Anand Mohan [ 10/Apr/18 ]

Hi Kelsey,

i am executing this in Secondary as you can see in the output which i updated earlier.

Comment by Kelsey Schubert [ 09/Apr/18 ]

Hi gg.anands@gmail.com,

Would you please clarify whether you are executing rs.printSlaveReplicationInfo() on the primary or secondary?

Thank you,
Kelsey

Comment by Anand Mohan [ 09/Apr/18 ]

Hi Fernandez,

I checked the timing but it is in sync.

MongoDB Enterprise rs01:PRIMARY> Date()
Mon Apr 09 2018 05:22:21 GMT-0500 (CDT)

MongoDB Enterprise rs01:SECONDARY> Date()
Mon Apr 09 2018 05:22:21 GMT-0500 (CDT)

Comment by Ramon Fernandez Marina [ 09/Apr/18 ]

gg.anands@gmail.com, what version of MongoDB are you using?

A simple explanation for this could be that your nodes are not properly time-synchronized – can you please check whether there's a time difference between the clocks of the affected nodes and report back?

Thanks,
Ramón.

Generated at Thu Feb 08 04:36:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.