<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:29:39 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-32237] Nodes that cannot become primary must neither update progress nor vote &quot;aye&quot;</title>
                <link>https://jira.mongodb.org/browse/SERVER-32237</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Consider a 3 node replica set with a primary, a secondary, and a voting-unelectable node (rollback, initial sync, or recovering). Consider the case where all nodes are replicating from the primary. The primary takes writes at times T1, T2, and T3 with w:majority. The secondary replicates the write at T1, and the voting-unelectable node replicates the writes at T1 and T2. The primary will see that T1 and T2 are both replicated to a majority and it will commit them and acknowledge them to the client. &lt;/p&gt;

&lt;p&gt;Now, if the primary crashes, consider what occurs. The secondary is behind the voting-unelectable node, so the voting-unelectable node won&apos;t vote for it (and can&apos;t because then we&apos;d lose the majority-committed write), but the other node is unelectable. We will thus not be able to elect a primary. If the unelectable node is also inconsistent, this is even worse because there is no way to make it electable.Thus we should not update our progress if we&apos;re unelectable.&lt;/p&gt;

&lt;p&gt;The node should not vote &quot;aye&quot; either. While voting &quot;aye&quot; will not cause us to lose committed writes (assuming we do not update progress as above), it will cause the unelectable node to vote for nodes that cannot commit writes, since it cannot be part of a majority to help commit writes.&lt;/p&gt;</description>
                <environment></environment>
        <key id="470029">SERVER-32237</key>
            <summary>Nodes that cannot become primary must neither update progress nor vote &quot;aye&quot;</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="3">Duplicate</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="judah.schvimer@mongodb.com">Judah Schvimer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Dec 2017 20:39:13 +0000</created>
                <updated>Tue, 6 Dec 2022 03:44:37 +0000</updated>
                            <resolved>Wed, 5 Feb 2020 18:40:56 +0000</resolved>
                                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2785404" author="judah.schvimer" created="Wed, 5 Feb 2020 18:40:35 +0000"  >&lt;p&gt;This ticket and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-17934&quot; title=&quot;Do not report upstream progress while in state STARTUP2&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-17934&quot;&gt;&lt;del&gt;SERVER-17934&lt;/del&gt;&lt;/a&gt; have both been scoped down to being the same. Closing this one as a duplicate.&lt;/p&gt;</comment>
                            <comment id="1763971" author="judah.schvimer" created="Wed, 3 Jan 2018 16:26:45 +0000"  >&lt;blockquote&gt;
&lt;p&gt;While voting &quot;aye&quot; will not cause us to lose committed writes (assuming we do not update progress as above), it will cause the unelectable node to vote for nodes that cannot commit writes, since it cannot be part of a majority to help commit writes.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If you&apos;re okay with voting for a primary that cannot commit majority writes, then I think it is fine to keep voting. Users may find this behavior surprising and it could lead to longer rollbacks. It could also lead to a primary being elected that cannot commit majority writes even if another node exists that could immediately commit majority writes if it were elected.&lt;/p&gt;</comment>
                            <comment id="1763489" author="spencer" created="Tue, 2 Jan 2018 23:14:21 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt;, thinking about this further, do we actually need to not vote &quot;aye&quot; or only to not report progress?  If we stop reporting progress then we don&apos;t need to worry about incorrectly satisfying a w:majority write, but if we keep voting (initial sync could consider all other nodes ahead of us, rollback could vote with the last common point) then we don&apos;t risk reducing write availability unnecessarily.&lt;/p&gt;</comment>
                            <comment id="1747602" author="milkie" created="Sat, 9 Dec 2017 01:31:36 +0000"  >&lt;p&gt;Also, I&#8217;m not sure users will expect that their commit level may stop moving after setting maintenance mode, if we make it stop reporting position. &lt;/p&gt;</comment>
                            <comment id="1747600" author="milkie" created="Sat, 9 Dec 2017 01:29:52 +0000"  >&lt;p&gt;Arbiters are also &#8220;nodes that cannot become primary&#8221;. I don&#8217;t think you can prohibit them from voting &#8220;aye&#8221;. &lt;/p&gt;</comment>
                            <comment id="1747462" author="judah.schvimer" created="Fri, 8 Dec 2017 21:54:37 +0000"  >&lt;p&gt;On second thought, we&apos;ll also have to make sure that the reporter does not send our updated optime in its liveness updates.&lt;/p&gt;</comment>
                            <comment id="1747455" author="judah.schvimer" created="Fri, 8 Dec 2017 21:48:28 +0000"  >&lt;p&gt;This also would still allow priority 0 nodes to forward their progress, but that&apos;s fine since they can always reconfig the nodes to be electable if needed.&lt;/p&gt;

&lt;p&gt;Maintenance Mode will not allow nodes to forward their progress, which is probably what we want anyways.&lt;/p&gt;</comment>
                            <comment id="1747447" author="judah.schvimer" created="Fri, 8 Dec 2017 21:42:36 +0000"  >&lt;p&gt;We can probably just add a check that we&apos;re in SECONDARY &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2680f414b5fd303b93e48ff5a49fdf04535f05ec/src/mongo/db/repl/replication_coordinator_impl.cpp#L1098-L1112&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. The only concern would be making sure that if we do the check and then immediately become SECONDARY, but never replicate another operation, that we still update our sync source. Based on my reading of the Reporter, it sends progress periodically even without an update (for liveness updates presumably): &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2680f414b5fd303b93e48ff5a49fdf04535f05ec/src/mongo/db/repl/reporter.cpp#L293-L302&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/2680f414b5fd303b93e48ff5a49fdf04535f05ec/src/mongo/db/repl/reporter.cpp#L293-L302&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="194817">SERVER-17934</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="470802">DOCS-11115</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="468757">SERVER-32185</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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25128"><![CDATA[Replication]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 9 Dec 2017 01:29:52 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 1 week 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1096</customfieldvalue>
                        </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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 1 week ago
                        </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>backlog-server-repl</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</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|htlvtr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htdhyn:</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_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|htlhxz:</customfieldvalue>

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