-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Monitoring
-
None
-
Minor Change
Currently the driver logs exceptions while trying to connect (in the background monitor thread) to a replica set member/mongos in two circumstances:
- when state goes from ok to !ok
- 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.
- when state goes from ok to !ok
- when state goes from !ok to back to ok
- when the server state changes (like from primary to secondary, or has different tags.