[SERVER-51160] Increase current sync source ping time in nodes_in_primarys_datacenter_dont_sync_across_datacenters.js Created: 25/Sep/20  Updated: 29/Oct/23  Resolved: 25/Sep/20

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

Type: Bug Priority: Major - P3
Reporter: Huayu Ouyang Assignee: Xuerui Fa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.7
Sprint: Repl 2020-10-05
Participants:
Linked BF Score: 37

 Description   

We found that in order to switch sync sources, the code first checks that the node's current sync source's ping time is greater than the candidate sync source's ping time by the changeSyncSourceThreshold, which defaults to 5 seconds.

In the logs, we found that the ping time for the current sync source was "pingMs" : NumberLong(11) , whereas the ping time for the primary (the candidate sync source) was "pingMs" : NumberLong(13) , so the node never switched sync sources to the primary. 

We can probably increase the delay between the data centers in the JS test to a larger value. 300 ms should be sufficient.



 Comments   
Comment by Githook User [ 25/Sep/20 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: SERVER-51160: Increase sync source ping time in nodes_in_primarys_datacenter_dont_sync_across_datacenters.js
Branch: master
https://github.com/mongodb/mongo/commit/8e971d9538d20a3ed218773cf674390eb9c98f97

Generated at Thu Feb 08 05:24:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.