Only log on server availability state changes

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 2.11.3, 3.0.0
    • Affects Version/s: None
    • Component/s: Monitoring
    • None
    • None
    • Minor Change
    • None
    • None
    • None
    • None
    • None
    • None

      Currently the driver logs exceptions while trying to connect (in the background monitor thread) to a replica set member/mongos in two circumstances:

      1. when state goes from ok to !ok
      2. otherwise, approximately 10% of the time when state is !ok

      The 10% rule is intended to reduce log flooding, but in a comment to this pull request, a commenter proposes a better idea: to log only the state changes, i.e.

      1. when state goes from ok to !ok
      2. when state goes from !ok to back to ok
      3. when the server state changes (like from primary to secondary, or has different tags.

            Assignee:
            Unassigned
            Reporter:
            Jeffrey Yemin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: