<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:19:19 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-9081] Can&apos;t failover last SECONDARY node with Replica set.</title>
                <link>https://jira.mongodb.org/browse/SERVER-9081</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;this is a dupe of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2826&quot; title=&quot;Can&amp;#39;t failover last SECONDARY node with Replica set.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2826&quot;&gt;&lt;del&gt;SERVER-2826&lt;/del&gt;&lt;/a&gt;.  I think it is absolute bullshit that a replica set can&apos;t survive if all but one dies.&lt;/p&gt;

&lt;p&gt;Give us a way to instruct a member to be primary without a majority.  Let us be the arbiter.&lt;/p&gt;</description>
                <environment></environment>
        <key id="69397">SERVER-9081</key>
            <summary>Can&apos;t failover last SECONDARY node with Replica set.</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="nicholas.tang@mongodb.com">Nicholas Tang</assignee>
                                    <reporter username="optimuspaul">Paul DeCoursey</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Mar 2013 14:07:35 +0000</created>
                <updated>Wed, 10 Dec 2014 23:10:41 +0000</updated>
                            <resolved>Tue, 2 Apr 2013 18:38:42 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="304316" author="nicholas.tang@10gen.com" created="Tue, 2 Apr 2013 18:02:41 +0000"  >&lt;p&gt;Paul,&lt;/p&gt;

&lt;p&gt;I&apos;m going to close this out, as it is working as designed.  Ultimately, the way I described things working is the only way to ensure automatic data consistency in the case of any network partition or failure; having a primary elected without a majority would allow the chance of multiple primaries, meaning inconsistency across the replicaset.&lt;/p&gt;

&lt;p&gt;If you have the time, this article is worth reading, as it goes through a detailed explanation much better than I can:&lt;br/&gt;
&lt;a href=&quot;http://codahale.com/you-cant-sacrifice-partition-tolerance/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://codahale.com/you-cant-sacrifice-partition-tolerance/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The quick summary, again, is that MongoDB choses consistency over (write) availability, which is why this happens.  It&apos;s not possible to have both, and it would require a large set of changes to change its behavior (not to mention potentially breaking the expected behavior for tens of thousands of clusters).&lt;/p&gt;

&lt;p&gt;I know that&apos;s probably not a satisfying answer, but it is the real one.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Nicholas&lt;/p&gt;</comment>
                            <comment id="296063" author="optimuspaul" created="Fri, 22 Mar 2013 18:31:42 +0000"  >&lt;p&gt;So what you are saying is that if I loose more than a majority of nodes at any one time the cluster goes into read-only mode?  And you are also saying we can&apos;t configure it to work in a more reasonable way?  I want my servers to operate like people, not politicians.&lt;/p&gt;</comment>
                            <comment id="295920" author="nicholas.tang@10gen.com" created="Fri, 22 Mar 2013 16:20:29 +0000"  >&lt;p&gt;Paul,&lt;/p&gt;

&lt;p&gt;Elections look for a majority of all possible nodes, not just local nodes.  In the scenario you described, the only location that would have a majority of votes would be the location with three nodes (3/5 &amp;gt; 1/2), which would elect a primary, and the other location would go into read-only mode (2/5 &amp;lt; 1/2).  When the network partition was resolved, the secondaries in the 2-node location would proceed to resync with the primary.  This still makes sure that we have data consistency across the cluster as a whole, if you use the writeconcern of majority in your app/ driver (more &lt;a href=&quot;http://docs.mongodb.org/manual/applications/replication/#write-concern&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;MongoDB&apos;s replication was designed to make sure that MongoDB wouldn&apos;t destroy or lose data.  In order to manage that, we have to assume the worst when there are various possibilities of failure.  That&apos;s why we provide the force option, to allow the operator to make a potentially dangerous configuration that they have determined is worth the risk (or that has no risk, as the case may be with the advantage of information the nodes don&apos;t have).&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Nicholas&lt;/p&gt;</comment>
                            <comment id="295907" author="optimuspaul" created="Fri, 22 Mar 2013 16:09:09 +0000"  >&lt;p&gt;You are solving for a problem that may or may not even exist.  The scenario can still occur if for instance I had a 5 member replica set and the network split leave two on one side and three on the other. In that case the failover would be successful for both segments. &lt;/p&gt;</comment>
                            <comment id="295859" author="nicholas.tang@10gen.com" created="Fri, 22 Mar 2013 15:22:19 +0000"  >&lt;p&gt;Paul,&lt;/p&gt;

&lt;p&gt;We don&apos;t automatically have a node take over when it can&apos;t get a majority of votes, and there&apos;s a good reason for that (which I&apos;ll get into momentarily).  However, if you want to override that, you can do that with rs.reconfig() using the force option.  Details on that command are &lt;a href=&quot;http://docs.mongodb.org/manual/reference/replica-commands/#rs.reconfig&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.  We have a tutorial in forcing this reconfiguration &lt;a href=&quot;http://docs.mongodb.org/manual/tutorial/reconfigure-replica-set-with-unavailable-members/#replica-set-force-reconfiguration&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; that explains it step by step.  If you use a centralized system for configuration management/ orchestration you could script this to happen automatically.  &lt;/p&gt;

&lt;p&gt;Even without electing a new primary, though, the remaining node will still allow requests to come in for reads, which can be configured at the app/driver level.  That&apos;s explained in more detail &lt;a href=&quot;http://docs.mongodb.org/manual/applications/replication/#read-preference&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and would allow your application to go into read-only mode in those scenarios until the majority could be resolved (or forced).&lt;/p&gt;

&lt;p&gt;Now, as to why we have that behavior: when two of the three nodes in a replicaset go offline because two of the hosts are confirmed down, you&apos;re absolutely correct that there&apos;s no reason why the third member shouldn&apos;t just take over.  The problem is when you have a network split (or partition) - for instance, if two nodes are in one location, and the third is in a 2nd location.  It&apos;s entirely possible to have a network issue that allows your application servers to see all three nodes, but to have the nodes at one location not see the other(s) (for instance, if you have app servers in both locations and GSLB (aka global, or geo, server load balancing) sending requests to both sets of app servers).  In those scenarios, if we didn&apos;t require a majority for election, you&apos;d end up with two primaries: one in location A, and one in location B, both accepting writes, and both with datasets now diverging.  Unfortunately, the nodes in the replicaset have no way of confirming whether the other hosts are actually down, or just inaccessible, and that&apos;s the key to this - if they could determine definitively that the other nodes were down, they could theoretically then elect a new primary even without majority.&lt;/p&gt;

&lt;p&gt;Requiring the majority prevents that, full stop.  It also makes for more challenging configuration, as you need to be aware of the full ramifications of various outage/ problem scenarios when designing the layout of your replicaset - but it allows us to keep data consistency when that happens.&lt;/p&gt;

&lt;p&gt;Does that make sense?  I&apos;m happy to answer any questions or give you more detail if you&apos;d like it.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Nicholas&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="15261">SERVER-2826</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="69411">DOCS-1290</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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 22 Mar 2013 15:22:19 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 46 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>false</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>
                            10 years, 46 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </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>nicholas.tang@mongodb.com</customfieldvalue>
            <customfieldvalue>optimuspaul</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrn0bj:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>47184</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;create a 3 member replica set.&lt;br/&gt;
knock one out.&lt;br/&gt;
watch them failover fine. cool.&lt;br/&gt;
knock another out&lt;br/&gt;
watch the your db go offline.&lt;/p&gt;</customfieldvalue>

                        </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|ht0nsf:</customfieldvalue>

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