<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:24:05 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-10793] Start election if more than one primary is online</title>
                <link>https://jira.mongodb.org/browse/SERVER-10793</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #EEEEEE;border-color: #ccc;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-color: #ccc;background-color: #6CB33F;&quot;&gt;&lt;b&gt;Issue Status as of March 28, 2014&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #EEEEEE;&quot;&gt;
&lt;p&gt;&lt;b&gt;ISSUE SUMMARY&lt;/b&gt;&lt;br/&gt;
Replica sets should only ever contain at most one primary node. If a primary detects another primary in the replica set via the heartbeat messages, the current behavior would force the primary to step down only if its &lt;tt&gt;_id&lt;/tt&gt; in the replica set configuration is higher than the other primary&apos;s &lt;tt&gt;_id&lt;/tt&gt;. The intention of this was to only step down one of the primaries, thus avoiding a new election. However, since the &lt;tt&gt;_id&lt;/tt&gt; is chosen arbitrarily and does not indicate priority, this can lead to a lower-priority member remaining as the primary node. Another issue is a one-way network partition, which could potentially lead to multiple primary nodes for prolonged times.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;USER IMPACT&lt;/b&gt;&lt;br/&gt;
This bug can lead to a primary node that does not have the highest priority, or in rare cases (i.e. with transient network issues) to multiple primaries for prolonged times. The latter situation can affect data integrity.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;SOLUTION&lt;/b&gt;&lt;br/&gt;
The fix is to unconditionally step down all primary nodes if multiple primary nodes are detected. While this can cause elections in more cases than before, it is safer than having the wrong primary, or potentially multiple primaries.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WORKAROUNDS&lt;/b&gt;&lt;br/&gt;
In situations where a lower-priority node remains the primary, a forced election with &lt;tt&gt;rs.stepDown()&lt;/tt&gt; can promote the higher-priority node back to primary.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;AFFECTED VERSIONS&lt;/b&gt;&lt;br/&gt;
All versions from 2.2.0 to 2.4.9 are affected. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;PATCHES&lt;/b&gt;&lt;br/&gt;
The fix is included in the 2.4.10 production release and the 2.5.5 development release, which will evolve into the 2.6.0 production release.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h6&gt;&lt;a name=&quot;OriginalDescription&quot;&gt;&lt;/a&gt;Original Description&lt;/h6&gt;

&lt;p&gt;Check at every heartbeat, as it comes in, that the state of the world shows only one primary at most. If more than one is found, start an election.&lt;/p&gt;</description>
                <environment></environment>
        <key id="90150">SERVER-10793</key>
            <summary>Start election if more than one primary is online</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="milkie@mongodb.com">Eric Milkie</assignee>
                                    <reporter username="scotthernandez">Scott Hernandez</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Sep 2013 21:13:04 +0000</created>
                <updated>Mon, 11 Jul 2016 17:39:47 +0000</updated>
                            <resolved>Wed, 15 Jan 2014 15:26:26 +0000</resolved>
                                                    <fixVersion>2.4.10</fixVersion>
                    <fixVersion>2.5.5</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="512124" author="xgen-internal-githook" created="Sun, 9 Mar 2014 15:28:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-10793&quot; title=&quot;Start election if more than one primary is online&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10793&quot;&gt;&lt;del&gt;SERVER-10793&lt;/del&gt;&lt;/a&gt; always step down when another primary is seen&lt;br/&gt;
Branch: v2.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a29de43de7fee23456fe44fcd4e00606427d2997&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a29de43de7fee23456fe44fcd4e00606427d2997&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="483044" author="milkie" created="Thu, 16 Jan 2014 14:05:09 +0000"  >&lt;p&gt;That is correct.  The other ticket is scheduled to be fixed with the larger refactor of election protocol.&lt;/p&gt;</comment>
                            <comment id="482921" author="zardosht" created="Thu, 16 Jan 2014 01:31:51 +0000"  >&lt;p&gt;I think this solution only works if the primaries see each other. If you have a network issue where the two primaries don&apos;t see each other, you can have two indefinite primaries. See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9848&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-9848&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="482480" author="xgen-internal-githook" created="Wed, 15 Jan 2014 15:26:16 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-10793&quot; title=&quot;Start election if more than one primary is online&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10793&quot;&gt;&lt;del&gt;SERVER-10793&lt;/del&gt;&lt;/a&gt; always step down when another primary is seen&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bebbcac06efd48abb2f9224150c7ae93b85fcf72&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bebbcac06efd48abb2f9224150c7ae93b85fcf72&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="443023" author="milkie" created="Fri, 18 Oct 2013 15:44:28 +0000"  >&lt;p&gt;Ok so if I&apos;m a primary node and I receive a heartbeat that someone else is primary, I should step down (at which point, the election logic will take over and hopefully end up with just 1 primary in the end).&lt;br/&gt;
We already have code to do that, it&apos;s manager.cpp:95.  We try to make sure only one primary steps down, but this logic is flawed if visibility in the cluster is not reflexive.&lt;/p&gt;</comment>
                            <comment id="443012" author="scotthernandez" created="Fri, 18 Oct 2013 15:35:22 +0000"  >&lt;p&gt;I was thinking that the primaries would take the action when they got the heartbeat. This was to try to cover the case that they got each others heartbeats (each showing that they were primary), not that a 3rd party getting the heartbeats.&lt;/p&gt;

&lt;p&gt;In the case it is a 3rd party we could use a new command (to inform both) but it seems like the only time we would need this would be when the two primaries can&apos;t directly communicate, since they should be able to react directly to heartbeats otherwise.&lt;/p&gt;</comment>
                            <comment id="442996" author="milkie" created="Fri, 18 Oct 2013 15:24:04 +0000"  >&lt;p&gt;It&apos;s not going to be that simple.  At each heartbeat, it&apos;s possible that you simply see one node step up to be primary before you get the heartbeat from the node that stepped down.&lt;br/&gt;
When you see more than one primary, what should your action be?  Run stepdown on the primaries you see?  Or simply attempt to elect yourself?  I would imagine as soon as you did that, both primaries would veto your election attempt.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="89882">SERVER-10768</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 18 Oct 2013 15:24:04 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 49 weeks, 3 days 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 49 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
            <customfieldvalue>zardosht</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmgdz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrsxfr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>82661</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|hrofhb:</customfieldvalue>

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