<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:11 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-836] Only log on server availability state changes</title>
                <link>https://jira.mongodb.org/browse/JAVA-836</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Currently the driver logs exceptions while trying to connect (in the background monitor thread) to a replica set member/mongos in two circumstances:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;when state goes from ok to !ok&lt;/li&gt;
	&lt;li&gt;otherwise, approximately 10% of the time when state is !ok&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The 10% rule is intended to reduce log flooding, but in a comment to this &lt;a href=&quot;https://github.com/nathanvda/mongo-java-driver/commit/a178fe25fb28ce2e8c209c0be2a66decdd39bdf1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;pull request&lt;/a&gt;, a &lt;a href=&quot;https://github.com/agrinevsky&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;commenter&lt;/a&gt; proposes a better idea: to log only the state changes, i.e.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;when state goes from ok to !ok&lt;/li&gt;
	&lt;li&gt;when state goes from !ok to back to ok&lt;/li&gt;
	&lt;li&gt;when the server state changes (like from primary to secondary, or has different tags.&lt;/li&gt;
&lt;/ol&gt;


</description>
                <environment></environment>
        <key id="77163">JAVA-836</key>
            <summary>Only log on server availability state changes</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 May 2013 13:51:20 +0000</created>
                <updated>Tue, 31 Mar 2015 20:09:32 +0000</updated>
                            <resolved>Wed, 5 Jun 2013 00:13:33 +0000</resolved>
                                                    <fixVersion>2.11.3</fixVersion>
                    <fixVersion>3.0.0</fixVersion>
                                    <component>Monitoring</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="869353" author="jeff.yemin" created="Tue, 31 Mar 2015 20:09:32 +0000"  >&lt;p&gt;Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released.&lt;/p&gt;</comment>
                            <comment id="423164" author="auto" created="Thu, 12 Sep 2013 02:05:41 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-836&quot; title=&quot;Only log on server availability state changes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-836&quot;&gt;&lt;del&gt;JAVA-836&lt;/del&gt;&lt;/a&gt;: Changed logic for logging of up and down servers.  Now the background thread logs on every state change, which will reduce log spamming dramatically.&lt;br/&gt;
Branch: 2.11.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/363401bb445cf65dc86509519342a6af2b85ea6f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/363401bb445cf65dc86509519342a6af2b85ea6f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="353137" author="jeff.yemin" created="Wed, 5 Jun 2013 00:13:33 +0000"  >&lt;p&gt;This can be seen as backwards breaking for two reasons:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;if users were relying on the old behavior where there are more frequent log messages&lt;/li&gt;
	&lt;li&gt;in 3.0.x branch, the log is named &quot;org.mongodb.connection.monitor&quot;, whereas in master it&apos;s named &quot;com.mongodb.ReplicaSetStatus&quot;&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="353134" author="jeff.yemin" created="Wed, 5 Jun 2013 00:11:11 +0000"  >&lt;p&gt;The fix in the master branch logs when state transitions from&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Connecting to either Connected or Unconnected&lt;/li&gt;
	&lt;li&gt;Connected to Unconnected&lt;/li&gt;
	&lt;li&gt;Unconnected to Connected&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In the 3.0.x branch, it also logs when state transitions from&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Connected to Connected but where the server description has changed, i.e.  different tags&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Also in 3.0, all the messages are logged at level INFO, whereas in master transitions to Unconnected are logged at level WARNING, while transitions to Connected are logged at INFO (to preserve backwards compatibility.&lt;/p&gt;</comment>
                            <comment id="353130" author="auto" created="Wed, 5 Jun 2013 00:07:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-836&quot; title=&quot;Only log on server availability state changes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-836&quot;&gt;&lt;del&gt;JAVA-836&lt;/del&gt;&lt;/a&gt;: Changed logic for logging of up and down servers.  Now the background thread logs on every state change, which will reduce log spamming dramatically.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/8e02cd006d79acd1d0ae6604c2ee7537b250c044&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/8e02cd006d79acd1d0ae6604c2ee7537b250c044&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="350247" author="auto" created="Fri, 31 May 2013 21:26:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-836&quot; title=&quot;Only log on server availability state changes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-836&quot;&gt;&lt;del&gt;JAVA-836&lt;/del&gt;&lt;/a&gt;: Refined server monitor thread to log  every state change of the server description (except avg ping time change...).&lt;br/&gt;
Branch: 3.0.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/e5c7b2552c8c240bd19c4cea91bc2a789d8ce76e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/e5c7b2552c8c240bd19c4cea91bc2a789d8ce76e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="349319" author="auto" created="Thu, 30 May 2013 22:11:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-836&quot; title=&quot;Only log on server availability state changes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-836&quot;&gt;&lt;del&gt;JAVA-836&lt;/del&gt;&lt;/a&gt;: Only log on state change in server monitor thread.&lt;br/&gt;
Branch: 3.0.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/26de3689a19e0a52f84d10bc503112a890b30109&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/26de3689a19e0a52f84d10bc503112a890b30109&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="48517">JAVA-632</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="51918">JAVA-655</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrqv7r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>70571</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>