<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:37: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-34682] Old primary should vote yes and store the last vote after stepdown on learning of a higher term</title>
                <link>https://jira.mongodb.org/browse/SERVER-34682</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;After stepdown, the old primary should store the last vote successfully even if the operation has been killed due to &lt;tt&gt;InterruptedDueToReplStateChange&lt;/tt&gt;. The response should return &lt;/p&gt;
{ ok: 1 }
&lt;p&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="534357">SERVER-34682</key>
            <summary>Old primary should vote yes and store the last vote after stepdown on learning of a higher term</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="13201">Fixed</resolution>
                                        <assignee username="william.schultz@mongodb.com">William Schultz</assignee>
                                    <reporter username="siyuan.zhou@mongodb.com">Siyuan Zhou</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Apr 2018 03:37:43 +0000</created>
                <updated>Sun, 29 Oct 2023 22:32:22 +0000</updated>
                            <resolved>Wed, 16 May 2018 22:54:36 +0000</resolved>
                                                    <fixVersion>3.4.17</fixVersion>
                    <fixVersion>3.6.6</fixVersion>
                    <fixVersion>4.0.0-rc0</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1955264" author="xgen-internal-githook" created="Tue, 24 Jul 2018 16:09:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;will62794&apos;, &apos;name&apos;: &apos;William Schultz&apos;, &apos;email&apos;: &apos;william.schultz@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34682&quot; title=&quot;Old primary should vote yes and store the last vote after stepdown on learning of a higher term&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34682&quot;&gt;&lt;del&gt;SERVER-34682&lt;/del&gt;&lt;/a&gt; Assert that replSetRequestVotes response status is OK&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bce06a11d01ad73da232934957e34cd0a2b9ca21&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bce06a11d01ad73da232934957e34cd0a2b9ca21&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1925578" author="xgen-internal-githook" created="Tue, 19 Jun 2018 21:50:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;will62794&apos;, &apos;name&apos;: &apos;William Schultz&apos;, &apos;email&apos;: &apos;william.schultz@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34682&quot; title=&quot;Old primary should vote yes and store the last vote after stepdown on learning of a higher term&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34682&quot;&gt;&lt;del&gt;SERVER-34682&lt;/del&gt;&lt;/a&gt; Assert that replSetRequestVotes response status is OK&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/6ce607a20faba65544f4eaf5d347339816b73e6b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/6ce607a20faba65544f4eaf5d347339816b73e6b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1917546" author="william.schultz" created="Mon, 11 Jun 2018 20:53:20 +0000"  >&lt;p&gt;Yep, that sounds appropriate to me.&lt;/p&gt;</comment>
                            <comment id="1894617" author="siyuan.zhou@10gen.com" created="Thu, 17 May 2018 20:45:53 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=william.schultz&quot; class=&quot;user-hover&quot; rel=&quot;william.schultz&quot;&gt;william.schultz&lt;/a&gt;, I think this second part of your patch (asserting that the vote response is actually&lt;br/&gt;
ok) needs to backport to 3.6 and maybe 3.4.  What do you think?&lt;/p&gt;</comment>
                            <comment id="1893484" author="xgen-internal-githook" created="Wed, 16 May 2018 22:54:11 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;william.schultz@mongodb.com&apos;, &apos;username&apos;: &apos;will62794&apos;, &apos;name&apos;: &apos;William Schultz&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34682&quot; title=&quot;Old primary should vote yes and store the last vote after stepdown on learning of a higher term&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34682&quot;&gt;&lt;del&gt;SERVER-34682&lt;/del&gt;&lt;/a&gt; Old primary should be able to store last vote when casting vote in new term&lt;/p&gt;

&lt;p&gt;This patch allows a current primary to step down and cast its vote for a&lt;br/&gt;
new primary in a higher term in one step. This allows for a new&lt;br/&gt;
candidate to become elected faster if it relies on the vote of an old&lt;br/&gt;
primary. Previously, when learning of a higher term via a&lt;br/&gt;
replSetRequestVote request, a primary would step down, causing us to&lt;br/&gt;
interrupt the processing of the vote request when we try to acquire a&lt;br/&gt;
lock to write down our LastVote document with an&lt;br/&gt;
InterruptedDueToReplStateChange code. This patch allows us to ignore&lt;br/&gt;
these interrupts, so we can proceed with processing the vote request.&lt;/p&gt;

&lt;p&gt;Additionally, this patch also asserts that the vote response is actually&lt;br/&gt;
ok, so that we don&apos;t erroneously send a voteGranted=yes response even if&lt;br/&gt;
we failed to persist our last vote document.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/6ccdeffc5aa60822d352ac389cb9e8e5647c242d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/6ccdeffc5aa60822d352ac389cb9e8e5647c242d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1888618" author="william.schultz" created="Thu, 10 May 2018 21:18:32 +0000"  >&lt;p&gt;To clarify, the issue is that we populate the response to a &lt;tt&gt;replSetRequestVote&lt;/tt&gt; command &lt;a href=&quot;https://github.com/mongodb/mongo/blob/79e63d3d49169fbac6f02f66742bc26a9342ba2c/src/mongo/db/repl/replication_coordinator_impl.cpp#L3166&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;, then &lt;a href=&quot;https://github.com/mongodb/mongo/blob/79e63d3d49169fbac6f02f66742bc26a9342ba2c/src/mongo/db/repl/replication_coordinator_impl.cpp#L3172&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;write down our vote&lt;/a&gt; to the LastVote document. The DB &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3bee8adabe9841da544a7e46788cbf5143552bb6/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp#L554&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;lock acquisition&lt;/a&gt; inside &lt;tt&gt;storeLocalLastVoteDocument&lt;/tt&gt; method may get interrupted with &lt;tt&gt;InterruptedDueToReplStateChange&lt;/tt&gt;, if we are currently in the process of stepping down. This will cause us to return a bad status from &lt;tt&gt;processReplSetRequestVotes&lt;/tt&gt;, but the response will be populated as if we granted our vote. This will cause us to end up sending a response that contains an &lt;tt&gt;ok: 0&lt;/tt&gt; field but with a body that indicates we granted a &quot;yes&quot; vote i.e. &lt;tt&gt;voteGranted=true&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="1876814" author="siyuan.zhou@10gen.com" created="Sat, 28 Apr 2018 00:27:38 +0000"  >&lt;p&gt;We want the new primary to get a vote from the old primary, so 2-node replset can finish an election quickly. The old primary steps down on receiving the higher term from the new one.&lt;/p&gt;</comment>
                            <comment id="1876779" author="spencer" created="Fri, 27 Apr 2018 22:25:27 +0000"  >&lt;p&gt;Why are you voting as part of stepping down?  &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                                                <inwardlinks description="is caused by">
                                        <issuelink>
            <issuekey id="341404">SERVER-27534</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="563192">SERVER-35766</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1318428">SERVER-47612</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="533549">SERVER-34661</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>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15141"><![CDATA[v3.6]]></customfieldvalue>
    <customfieldvalue key="14340"><![CDATA[v3.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 27 Apr 2018 22:25:27 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 29 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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 29 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>17.0</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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
            <customfieldvalue>william.schultz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htwh9b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htlak7:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="2278">Repl 2018-05-21</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|htw3hj:</customfieldvalue>

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