<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:49 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-2285] Unable to reconnect to a replica set after a failover due to stale electionId</title>
                <link>https://jira.mongodb.org/browse/JAVA-2285</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;the java driver will try to connect to the replicate set infinitely when the replica set restart after the driver client starting. &lt;br/&gt;
the driver&apos;s log:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2016-08-22 07:55:25,238 [cluster-ClusterId{value=&apos;57b680b7c9e77c00067b4846&apos;, description=&apos;null&apos;}-10.1.245.5:37017] INFO  org.mongodb.driver.cluster(71) - Monitor thread successfully connected to server with description ServerDescription{address=10.1.245.5:37017, type=REPLICA_SET_PRIMARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 0, 3]}, minWireVersion=0, maxWireVersion=3, electionId=57baa776aa4cc97ba6377d74, maxDocumentSize=16777216, roundTripTimeNanos=370494, setName=&apos;rs0&apos;, canonicalAddress=10.1.245.5:37017, hosts=[10.1.245.6:37017, 10.1.245.5:37017], passives=[], arbiters=[10.1.245.7:37017], primary=&apos;10.1.245.5:37017&apos;, tagSet=TagSet{[]}}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2016-08-22 07:55:25,238 [cluster-ClusterId{value=&apos;57b680b7c9e77c00067b4846&apos;, description=&apos;null&apos;}-10.1.245.5:37017] INFO  org.mongodb.driver.cluster(71) - Invalidating potential primary 10.1.245.5:37017 whose election id 57baa776aa4cc97ba6377d74 is less than the max election id seen so far 57baa83768f8cf45a0d87054&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment>mongodb 3.0.2 replica set, three nodes , java driver: 3.2.0, centos 7.0</environment>
        <key id="310716">JAVA-2285</key>
            <summary>Unable to reconnect to a replica set after a failover due to stale electionId</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="dude">Dude Dou</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Aug 2016 09:14:53 +0000</created>
                <updated>Tue, 13 Sep 2016 01:43:24 +0000</updated>
                            <resolved>Tue, 13 Sep 2016 01:43:24 +0000</resolved>
                                    <version>3.2.0</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1382815" author="jeff.yemin" created="Tue, 13 Sep 2016 01:43:24 +0000"  >&lt;p&gt;As we haven&apos;t heard back from you in quite some time, I&apos;m closing this issue but will re-open if you come back with further information.&lt;/p&gt;</comment>
                            <comment id="1365782" author="jeff.yemin" created="Tue, 23 Aug 2016 22:25:08 +0000"  >&lt;p&gt;Hi Dude,&lt;/p&gt;

&lt;p&gt;Thanks for the reproduction steps.  So far I have not been able to reproduce the same behavior as you have, but I can see from the logs you provided what looks like a real problem.  &lt;/p&gt;

&lt;p&gt;In order to help get to the root cause, can you re-execute the reproduction scenario and attach new client logs as well as server logs for all three replica set members for the time period of the test?   &lt;/p&gt;


&lt;p&gt;Regards,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="1364446" author="dude" created="Tue, 23 Aug 2016 03:45:52 +0000"  >&lt;p&gt;We have reproduced this scenario by the following steps:&lt;br/&gt;
  1. stop the replica set nodes( one primary node, one secondary node and one arbiter node) with any order, the client is ok.&lt;br/&gt;
  2, start the arbiter node first, then the secondary node and last the primary node&lt;br/&gt;
  3. repeat step 1 and 2 again, the client will loop forever.&lt;/p&gt;

&lt;p&gt;the logs is in attach&lt;/p&gt;
</comment>
                            <comment id="1363366" author="jeff.yemin" created="Mon, 22 Aug 2016 13:24:56 +0000"  >&lt;p&gt;Hi Dude,&lt;/p&gt;

&lt;p&gt;Thanks for the report.   From the client logs you provided, this looks to be related to a feature in the driver for &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#using-setversion-and-electionid-to-detect-stale-primaries&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;detecting stale primaries&lt;/a&gt;.  In your case, the driver sees the 10.1.245.5:37017 as a stale primary because its reported electionId is less than an electionId detected earlier.&lt;/p&gt;

&lt;p&gt;In order to determine if there is an actual bug in either the driver or the server, please:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Provide the full client logs for the org.mongodb.driver.cluster logging component&lt;/li&gt;
	&lt;li&gt;Elaborate on what you mean by a &apos;replica set restart&apos;.  What exactly was restarted and in what order?  Is there evidence of a primary failover occurring during the restarts?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Thanks,&lt;br/&gt;
Jeff&lt;/p&gt;


</comment>
                    </comments>
                    <attachments>
                            <attachment id="135993" name="idps.log" size="49712" author="dude" created="Tue, 23 Aug 2016 03:45:48 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <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|hsoxwf:</customfieldvalue>

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