[SERVER-48930] Use lastFetched from previous batch when comparing optimes for re-evaluating sync source Created: 17/Jun/20  Updated: 29/Oct/23  Resolved: 09/Jul/20

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

Type: Improvement Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Xuerui Fa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2020-07-13
Participants:

 Description   

Instead of using the latest optime for the batch that was just fetched, we should use the latest optime in the previous batch. If we find that the node wants to change sync sources, then we will abandon the batch that was just fetched and try to sync from another node.

This will make it more likely for a node to switch sync sources when they are at similar optimes, because it increases the chances that the node thinks it is behind the other node.



 Comments   
Comment by Githook User [ 09/Jul/20 ]

Author:

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

Message: SERVER-48930: Use lastFetched from previous batch when comparing optimes for re-evaluating sync source
Branch: master
https://github.com/mongodb/mongo/commit/1b0445dc3ea2a3d15ae477238f68b0a4438a7212

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