Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-836

Only log on server availability state changes

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.11.3, 3.0.0
    • Component/s: Monitoring
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • # Replies:
      7
    • Last comment by Customer:
      false

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jeff.yemin Jeff Yemin
                Participants:
                Last commenter:
                Rathi Gnanasekaran
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since reply:
                  2 years, 33 weeks, 3 days ago
                  Date of 1st Reply: