[SERVER-48233] Investigate if we can run SyncSourceResolver only after OplogFetcher returns TooStaleToSyncFromSource Created: 14/May/20  Updated: 06/Dec/22

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

Type: Improvement Priority: Major - P3
Reporter: Xuerui Fa Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Replication
Participants:

 Description   

Currently, the SyncSourceResolver finds a valid sync source and does three remote calls on that node. The first is to make sure that we aren't too stale to sync from the node, and the other two are related to rollback-via-refetch. After EMRC=false is removed from the code base, we should be able to remove those last two remote calls, so that the only check in SyncSourceResolver is the "too stale" check.

In SERVER-28068, we added a check to the OplogFetcher to ensure that we are not too stale to sync from our sync source. As a result, we should investigate to see if we no longer need to run the SyncSourceResolver before the OplogFetcher, and we can run it only if the OplogFetcher returns that it is too stale.

Making this change will allow us to avoid running SyncSourceResolver on every loop of bgsync, improving both complexity and performance.



 Comments   
Comment by Samyukta Lanka [ 14/May/20 ]

One thing we should consider is that we still want to allow for a mechanism to exit Maintenance Mode in bgsync if we find out that there is a node that we are not too stale to sync from. I think in that case, we might still want to run the SyncSourceResolver at the beginning of the bgsync loop.

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