-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
v4.7
-
Repl 2020-10-05
-
37
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.