Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-91960

Clear sync source candidate if sync source selection fails

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • v8.0
    • Repl 2024-07-08, Repl 2024-07-22
    • 200

      Consider a replica set where node A is syncing from node B. Every time A receives a batch of oplog entries from B, it will re-evalaute if its sync source is still a good option. One key criteria is whether or not A is caught up to B, and if it is, is B either the primary or have its own sync source (so that we know B will keep advancing its last applied).

      The problem can arise depending on B's sync source. When B chooses a sync source candidate, it sets its sync source in the topology coordinator, but it doesn't clear it if that sync source candidate does not successfully become the new sync source.

      When A re-evaluates its sync source based on the OplogQueryMetadata it gets from B, it thinks that B has a sync source, so it never decides to change who to sync from. This can mean that A takes a long time to realize it needs to switch sync sources.

            Assignee:
            frederic.vitzikam@mongodb.com Frederic Vitzikam
            Reporter:
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: