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

shouldLogIneligibleCandidate incorrectly calculated

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2025-03-31
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-85915 introduced a new variable `limitLogFrequency` in `isEligibleSyncSource` in topology_coordinator.cpp to reduce excess logging in the case of `shouldChangeSyncSourceDueToPingTime`. `shouldLogIneligibleCandidate` was meant to control logging and always log unless it was in `shouldChangeSyncSourceDueToPingTime` when it would be false if it limitLogFrequency is true and we had already logged this reason in the last 1 second. Missing negation on `limitLogFrequency` in this expression is causing `shouldLogIneligibleCandidate` to be the opposite of what it should be.

            Assignee:
            ruchitha.rajaghatta@mongodb.com Ruchitha Rajaghatta
            Reporter:
            ruchitha.rajaghatta@mongodb.com Ruchitha Rajaghatta
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None