<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:20:29 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-9464] On election, relax priority restriction when another member is fresher</title>
                <link>https://jira.mongodb.org/browse/SERVER-9464</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Consider having a replica set of 3 machines: dd-db1, dd-db2, dd-db3 with assigned priorities of 1.5, 1.0 and 0.7 correspondingly. dd-db1 is primary, other two are secondaries. Now, restart dd-db1 and dd-ddb3, the primary will shift (according to priorities) to dd-db2, which is correct. Now, restart dd-db2. It will also lose it&apos;s primary state, which is also correct. But now, if writes were coming at a steady pace, the oplog of dd-db2 would be several operations ahead of dd-db1 and dd-db3. This leads to replica set not getting a primary, since while dd-db2 is freshest and should become primary, the dd-db1 is up and has higher priority. I understand that it&apos;s a hard choice &amp;#8211; either ignore priorities in favor of freshness or ignore freshness (and possibly cause rollbacks leading to a likely data loss) and favor priorities. I still think both of these solutions are better than leaving a replica set in the infinite &quot;no primary&quot; state. By the way, temporarily shutting down the higher-priority server helps, the freshest server becomes primary and the restarted higher-priority server just catches up and becomes primary again after a new election.&lt;/p&gt;

&lt;p&gt;P.S. We&apos;ve seen this with 2.2 also, moved to 2.4 but it appears to still ocur.&lt;/p&gt;</description>
                <environment></environment>
        <key id="73107">SERVER-9464</key>
            <summary>On election, relax priority restriction when another member is fresher</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="3">Duplicate</resolution>
                                        <assignee username="matt.dannenberg">Matt Dannenberg</assignee>
                                    <reporter username="onyxmaster">Aristarkh Zagorodnikov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Apr 2013 16:15:26 +0000</created>
                <updated>Wed, 10 Dec 2014 23:07:08 +0000</updated>
                            <resolved>Tue, 23 Jul 2013 22:34:32 +0000</resolved>
                                    <version>2.4.3</version>
                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="411328" author="onyxmaster" created="Mon, 26 Aug 2013 12:50:06 +0000"  >&lt;p&gt;Moved all my late comments to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-10621&quot; title=&quot;Replication failover hangs indefinitely when priorities conflict with replication&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10621&quot;&gt;&lt;del&gt;SERVER-10621&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="387307" author="mattd@10gen.com" created="Tue, 23 Jul 2013 21:14:47 +0000"  >&lt;p&gt;This is fixed by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9934&quot; title=&quot;Slow failovers after step down due to sleeping rsBackgroundSync&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9934&quot;&gt;&lt;del&gt;SERVER-9934&lt;/del&gt;&lt;/a&gt;. I&apos;ve marked &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9934&quot; title=&quot;Slow failovers after step down due to sleeping rsBackgroundSync&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9934&quot;&gt;&lt;del&gt;SERVER-9934&lt;/del&gt;&lt;/a&gt; for backport as a result. Please follow that ticket for updates.&lt;/p&gt;</comment>
                            <comment id="387046" author="onyxmaster" created="Tue, 23 Jul 2013 15:29:23 +0000"  >&lt;p&gt;I honestly doubt that the OS choice is important here, I believe Arch would do fine (CentOS 6.4 behaved in the same way for example). Yes, stopping writes solves the problem, but it appears that it is at least a part of the reason behind the problem itself. db0 might become primary, this is what I meant with &quot;repro works in about 85%...&quot; &amp;#8211; the remaining 15% represent the case when everything works normally. As for hanging at &quot;db1 to become primary&quot;, I&apos;m not sure if I had this problem (will do some testing), but you can just kill the script if it hangs and inspect the rs.status() of remaining servers (db1 &amp;amp; db2) for any hints to the reason behind this specific issue.&lt;/p&gt;</comment>
                            <comment id="387038" author="mattd@10gen.com" created="Tue, 23 Jul 2013 15:21:12 +0000"  >&lt;p&gt;I spent a bit more time on this friday, but could not find the root cause of your problem. However, I did find that if write operations were halted before the primary came back online, the situation seemed to resolve as expected (db0 becomes primary). Also, by random chance your script seems to occasionally result in the db0 becoming primary. Lastly, I found the repro script would hang indefinitely at &apos;Waiting for db1 to become primary&apos; fairly frequently for me. Does it work more consistently for you? I am running arch rather than ubuntu and wonder if it might be setting up ubuntu to work on this.&lt;/p&gt;</comment>
                            <comment id="381335" author="onyxmaster" created="Mon, 15 Jul 2013 15:48:46 +0000"  >&lt;p&gt;No problem, it&apos;s great that the repro worked.&lt;/p&gt;</comment>
                            <comment id="381313" author="mattd@10gen.com" created="Mon, 15 Jul 2013 15:26:35 +0000"  >&lt;p&gt;Sorry for the lack of response, I was on vacation.&lt;/p&gt;

&lt;p&gt;I was able to run your repro and it worked as described. We are pushing out a release this week, but hopefully I can spend more time on this after that.&lt;/p&gt;</comment>
                            <comment id="375940" author="onyxmaster" created="Mon, 8 Jul 2013 08:57:02 +0000"  >&lt;p&gt;Hi!&lt;br/&gt;
Were you able to repro the issue in your environment?&lt;/p&gt;</comment>
                            <comment id="371453" author="onyxmaster" created="Mon, 1 Jul 2013 09:01:09 +0000"  >&lt;p&gt;Again I ask you to excuse me for the long silence, had a lot on my hands after a trip to MongoNYC. &lt;br/&gt;
I created a small repro tool. It requires a modern Linux (I used Ubuntu 12.04.2 LTS), mongod and mongo binaries in path, ruby (1.8.7+) and a 10gen ruby driver (I used 1.9.0).&lt;br/&gt;
I did tests versus 2.4.4 version of MongoDB. The repro works in about 85% of the times. After installing the aforementioned prerequisites, just copy loadgen.rb and test.sh to any directory that is writable by the current user, and execute the test.sh script. Its progress is pretty straightforward, you can examine the script itself.&lt;/p&gt;</comment>
                            <comment id="368548" author="mattd@10gen.com" created="Wed, 26 Jun 2013 22:06:16 +0000"  >&lt;p&gt;I wrote a test that I believe checks what Scott proposed as the issue and it appears to show that the conclusions reached above are not correct. I&apos;ve attached the test so that you can see what it does and confirm my beliefs.&lt;/p&gt;

&lt;p&gt;Let me know if you have a step-by-step (or better still automated) repro.&lt;/p&gt;</comment>
                            <comment id="366943" author="onyxmaster" created="Tue, 25 Jun 2013 01:33:34 +0000"  >&lt;p&gt;Yes, this should solve this case.&lt;/p&gt;</comment>
                            <comment id="366839" author="scotthernandez" created="Mon, 24 Jun 2013 22:24:51 +0000"  >&lt;p&gt;I think the problem is in this case where no chaining is allowed where we really want it to mean prefer primary, not only primary, as a replication source, so that the high priority node can become freshest and be elected. I believe what we want in this situation is the higher priority node to replicate and become the freshest from the non-primary replica (with lower priority).&lt;/p&gt;</comment>
                            <comment id="365351" author="onyxmaster" created="Sat, 22 Jun 2013 00:58:29 +0000"  >&lt;p&gt;After I talked today with Scott Hernandez, I remembered that I should note that we have chained replication disabled, so the secondary with higher priority can&apos;t catch up from the more fresh one.&lt;/p&gt;</comment>
                            <comment id="355161" author="onyxmaster" created="Fri, 7 Jun 2013 08:37:15 +0000"  >&lt;p&gt;Matt, sorry for the long delay, I&apos;m currently very busy. Will do something about repro steps in the coming days.&lt;/p&gt;</comment>
                            <comment id="352510" author="mattd@10gen.com" created="Tue, 4 Jun 2013 14:32:30 +0000"  >&lt;p&gt;I am having trouble reproducing what you&apos;ve described above. Can you give me the step by step commands used to produce this behavior?&lt;/p&gt;</comment>
                            <comment id="331022" author="onyxmaster" created="Wed, 8 May 2013 13:25:52 +0000"  >&lt;p&gt;Good to hear it&apos;s going to be improved, thanks.&lt;/p&gt;</comment>
                            <comment id="330454" author="milkie" created="Tue, 7 May 2013 18:58:23 +0000"  >&lt;p&gt;Rollbacks are very undesirable.  The documentation says that priorities help guide which member gets elected but they are not absolute.&lt;br/&gt;
In the situation outlined in the description above, we should elect the lower priority, freshest member.  The primaryship will subsequently move to the higher priority node after it has caught up.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="79004">SERVER-9934</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="87366">SERVER-10621</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="28476" name="loadgen.rb" size="375" author="onyxmaster" created="Mon, 1 Jul 2013 09:01:09 +0000"/>
                            <attachment id="28477" name="test.sh" size="2895" author="onyxmaster" created="Mon, 1 Jul 2013 09:01:09 +0000"/>
                            <attachment id="28339" name="test1.js" size="1968" author="matt.dannenberg" created="Wed, 26 Jun 2013 22:06:16 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>16.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 7 May 2013 18:58:23 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 25 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>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>
                            10 years, 25 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>onyxmaster</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.dannenberg</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|hrmvqf:</customfieldvalue>

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

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

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