<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:13:47 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-7156] w:majority issues with votes</title>
                <link>https://jira.mongodb.org/browse/SERVER-7156</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If you have a weird distribution of votes in a system, you can have a situation where a write succeeds with w:majority but disappears after a failover. For example:&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;{ _id : &quot;myrs&quot;,&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;   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;  members : [ { _id : &quot;0&quot;, host : &quot;A&quot;, votes: 1 },&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;   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;              { _id : &quot;1&quot;, host : &quot;B&quot;, votes: 1 },&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;              { _id : &quot;2&quot;, host : &quot;C&quot;, votes: 3 } ] }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Suppose w:majority write reaches &quot;A&quot; and &quot;B&quot; but not &quot;C&quot;, so the client gets the confirmation; and then &quot;A&quot; and &quot;B&quot; both fail simultaneously. &quot;C&quot; will elect itself primary, but not have the write.&lt;/p&gt;

&lt;p&gt;If the goal of w:majority is to give people the guarantee that the write will remain despite any failure that nonetheless leaves the replica set with a primary, then w:majority should be vote-aware.&lt;/p&gt;

&lt;p&gt;Alternatively, we should get rid of votes.&lt;/p&gt;

&lt;p&gt;EDIT:  We will be deprecating member votes that are not 0 or 1.&lt;/p&gt;</description>
                <environment></environment>
        <key id="51430">SERVER-7156</key>
            <summary>w:majority issues with votes</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="milkie@mongodb.com">Eric Milkie</assignee>
                                    <reporter username="richard.kreuter">Richard Kreuter</reporter>
                        <labels>
                    </labels>
                <created>Tue, 25 Sep 2012 20:27:11 +0000</created>
                <updated>Wed, 10 Dec 2014 23:12:05 +0000</updated>
                            <resolved>Mon, 19 Aug 2013 12:26:40 +0000</resolved>
                                                                    <component>Replication</component>
                                        <votes>10</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="406179" author="milkie" created="Mon, 19 Aug 2013 12:25:59 +0000"  >&lt;p&gt;Correction: we will only deprecate votes &amp;gt; 1 (see linked ticket), and no further work will be done for this ticket.&lt;/p&gt;</comment>
                            <comment id="403240" author="milkie" created="Wed, 14 Aug 2013 20:56:43 +0000"  >&lt;p&gt;For 2.6, votes will be deprecated.  -&lt;del&gt;For this ticket, w:majority will treat every node with votes &amp;gt; 1 as votes = 1 for that node.&lt;/del&gt;-&lt;/p&gt;</comment>
                            <comment id="392079" author="milkie" created="Tue, 30 Jul 2013 19:44:33 +0000"  >&lt;p&gt;How should this behave with arbiters?&lt;/p&gt;

&lt;p&gt;The current behavior is somewhat complicated.  For a majority, it uses either (half the number of nodes + 1), or (the total number of non-arbiters), whichever is fewer.&lt;/p&gt;

&lt;p&gt;For the new behavior, we can do:&lt;br/&gt;
half the total number of votes from electable members + 1.  An electable member is a member with priority &amp;gt; 0 and is not an arbiter.  Note that all members will be treated as having either 0 or 1 vote.&lt;/p&gt;</comment>
                            <comment id="329491" author="spencer" created="Mon, 6 May 2013 15:46:56 +0000"  >&lt;p&gt;This is also a problem if you set votes to zero.  Imagine a 5-node replica set with 3 nodes in one DC and 2 in other.  If your main DC goes down, one way to make the other DC elect a primary would be to do a forced reconfigure and set votes:0 on the 3 nodes from the main DC, which are all down.  That would successfully cause the set to think it has a majority and promote one of the two remaining nodes to primary.  If, however, you then do a write with w:majority, it will time out as it will still consider the votes:0 nodes to be part of the majority needed for write acknowledgement.&lt;/p&gt;</comment>
                            <comment id="175517" author="christopher.price@mtvn.com" created="Tue, 16 Oct 2012 16:41:32 +0000"  >&lt;p&gt;+1  In my use case I have 3 node set: 1 Primary, 1 Visible Secondary and 1 Hidden Secondary.  This feature would solve TWO problems for me.&lt;/p&gt;

&lt;p&gt;Problem #1 = As described above, a replica safe write really isn&apos;t safe if it is only written to hidden nodes or nodes that can &quot;never&quot; get elected.  Using REPLICAS_SAFE.&lt;/p&gt;

&lt;p&gt;Problem #2 = Throttling writes.  When the replication chain is like this:&lt;br/&gt;
Visible Secondary syncs from Hidden Secondary&lt;br/&gt;
Hidden Secondary syncs from Primary&lt;br/&gt;
Then there is a throttling problem.  Our application occasionally has massive spikes of writes and long running reads.  During this time, our writes (with w=2) get applied to the Primary and Hidden nodes and the application immediately processes the next write.  But because the visible secondary is serving some long running reads, there is a lot of locking/unlocking/yielding going on which has several times lead to replication lag on the visible secondary.  This also sometimes leads to the visible secondary becoming completely unresponsive.&lt;/p&gt;

&lt;p&gt;I estimate that this ticket would solve about 90% of our Mongo-based outages.&lt;/p&gt;

&lt;p&gt;Perhaps this could be a REPLICAS_SAFE replica set configuration option?  Something that ensures that non-electable nodes do not sync directly off of the primary (unless it is the only thing available) and that visible secondaries should never sync off of hidden or non-electable nodes (the chain should always go to a primary or visible secondary with the same or more number of votes).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="56517">SERVER-7681</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="17152">SERVER-3110</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="85995">SERVER-10513</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="32325">SERVER-5218</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>Tue, 16 Oct 2012 16:41:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 26 weeks, 2 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>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, 26 weeks, 2 days 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>christopher.price@mtvn.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>richard.kreuter</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnna7:</customfieldvalue>

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

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

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