Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major - P3
-
Resolution: Fixed
-
Affects Version/s: None
-
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:
- 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.
Author:
{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message:
JAVA-836: Only log on state change in server monitor thread.Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/26de3689a19e0a52f84d10bc503112a890b30109