<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:49:03 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>[SERVER-18889] Reelection waiting for a dead system to vote</title>
                <link>https://jira.mongodb.org/browse/SERVER-18889</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;b&gt;tl;dr&lt;/b&gt;&lt;br/&gt;
Former Primary becomes Secondary and fails reelection waiting indefinitely for dead node to vote when another Secondary node is cleanly shut down, while third node is known to be dead. This renders whole replica set unresponsive while there is a healthy server - one supposed to be the Primary.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Whole thing&lt;/b&gt;&lt;br/&gt;
The system I&apos;m running consists of three servers in a replica set, two active user facing nodes (&lt;tt&gt;mongo01&lt;/tt&gt; &amp;amp; &lt;tt&gt;mongo02&lt;/tt&gt;) and one hidden node (&lt;tt&gt;dbslave01&lt;/tt&gt;), for backups. All three are voting, &lt;tt&gt;mongo01&lt;/tt&gt; &amp;amp; &lt;tt&gt;mongo02&lt;/tt&gt; have &lt;tt&gt;priority:1&lt;/tt&gt; and &lt;tt&gt;hidden:false&lt;/tt&gt;, while &lt;tt&gt;dbslave01&lt;/tt&gt; has &lt;tt&gt;priority:0&lt;/tt&gt; and &lt;tt&gt;hidden:true&lt;/tt&gt;. &lt;br/&gt;
After migrating the whole cluster to MongoDB3.0 the replication statuses are: &lt;tt&gt;mongo02&lt;/tt&gt; - &lt;tt&gt;PRIMARY&lt;/tt&gt;, &lt;tt&gt;mongo01&lt;/tt&gt; - &lt;tt&gt;SECONDARY&lt;/tt&gt;. while &lt;tt&gt;dbslave01&lt;/tt&gt; is still in &quot;&lt;tt&gt;not reacheable/healthy&lt;/tt&gt;&quot; state, because it crashed during initial startup (though that&apos;s not the point of this ticket). &lt;/p&gt;

&lt;p&gt;So having that system state the problem is:&lt;br/&gt;
I log in into &lt;tt&gt;mongo01&lt;/tt&gt; (&lt;tt&gt;SECONDARY&lt;/tt&gt;) and issue a &lt;tt&gt;db.shutdownServer()&lt;/tt&gt; command. That works fine on &lt;tt&gt;mongo01&lt;/tt&gt; and it goes down. But at the same time &lt;tt&gt;mongo02&lt;/tt&gt; (&lt;tt&gt;PRIMARY&lt;/tt&gt;) triggers a reelection, and election fails because it thinks it needs to have at least two votes to become primary again, while &lt;tt&gt;dbslave01&lt;/tt&gt; is unable to vote (being down) and thus one vote is missing. &lt;/p&gt;

&lt;p&gt;That seems like a errorneous behaviour since unreacheable system should obviously be not expected to vote and the only live server should happily reelect itself to keep being primary. Or ideally election would not trigger because of a secondary shutdown if a primary is still live and serving, because even successful election will still cause connections dropping and service interuption.&lt;/p&gt;</description>
                <environment></environment>
        <key id="209376">SERVER-18889</key>
            <summary>Reelection waiting for a dead system to vote</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="mobafill">Alex Kotenko</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Jun 2015 11:50:31 +0000</created>
                <updated>Tue, 9 Jun 2015 12:22:42 +0000</updated>
                            <resolved>Tue, 9 Jun 2015 12:22:42 +0000</resolved>
                                    <version>3.0.3</version>
                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="934987" author="scotthernandez" created="Tue, 9 Jun 2015 12:22:42 +0000"  >&lt;p&gt;Alex, what you describe is a set of 3 voting nodes where 2 are down, and cannot vote. In this scenario 1/3 of the votes is not a majority and cannot elect a primary, by design. If that one node, alone, could become primary then it would lead to problems where split networks or other failure cases could cause more than 1 primary to exist, for example.&lt;/p&gt;

&lt;p&gt;Here are the docs discussing this in a bit more detail which you might find helpful: &lt;a href=&quot;http://docs.mongodb.org/manual/core/replica-set-elections/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/core/replica-set-elections/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 9 Jun 2015 12:22:42 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 36 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>scotthernandez</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 36 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>mobafill</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrl3p3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsa533:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsfycn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>