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

TopologyCoordinator::shouldChangeSyncSource() should consider chainingAllowed setting when comparing sync source's optime against secondaries

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Repl 2024-10-14, Repl 2024-10-28

      A secondary node will discard its current sync source if its sync source appears to lag another node by more than a certain threshold (See server parameter maxSyncSourceLagSecs) and log the following message:

      re-evaluating sync source because our current sync source's most recent  OpTime is XXXXX  which is more than NNN behind member XXXX  whose most recent OpTime is XXXX
      

      If chaining is disallowed in the replica set configuration, the secondary will choose the same node (the primary) that it just discarded as a sync source earlier.

      The criteria for deciding to change sync source should be improved to consider the current chainingAllowed setting to reduce the frequency of reconnecting to the same (primary) sync source to query the oplog.

      https://docs.mongodb.com/manual/reference/replica-configuration/#rsconf.settings.chainingAllowed

            Assignee:
            ruchitha.rajaghatta@mongodb.com Ruchitha Rajaghatta
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: