<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:08:07 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-45178] Rollback via refetch can cause rollback to happen successfully w/o updating the rollback id.</title>
                <link>https://jira.mongodb.org/browse/SERVER-45178</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Our current rollback via refetch currently &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d38d7026a4fcd5e524b3d35e405d49e4ac8989c3/src/mongo/db/repl/rs_rollback.cpp#L1002-L1006&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;increments&lt;/a&gt; the rollback id only after the completion of rollback (i.e. only after&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/d38d7026a4fcd5e524b3d35e405d49e4ac8989c3/src/mongo/db/repl/rs_rollback.cpp#L1529-L1547&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;truncation&lt;/a&gt; of oplog). Consider a below scenario.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;1) syncFixup() //&#160;&lt;b&gt;rollback + Truncates&#160;the oplog.&lt;/b&gt;&lt;/tt&gt;&lt;br/&gt;
 &#160;&lt;tt&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ---&amp;gt;&#160;***&lt;b&gt;&lt;font color=&quot;#de350b&quot;&gt;Unclean shutdown happens here*&lt;/font&gt;&lt;/b&gt;**&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;2) incrementRollbackID() //&#160;&lt;b&gt;Persists&lt;/b&gt;&#160;&lt;b&gt;the&lt;/b&gt; &lt;b&gt;updated&lt;/b&gt;&#160;&lt;b&gt;Rollback ID.&lt;/b&gt;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;On node restart, since we have truncated the oplog, the node doesn&apos;t transition to rollback state again. So, we don&apos;t increment the rollback id. This can lead to nodes silently completing the rollback without the other nodes knowing about it.&lt;/p&gt;

&lt;p&gt;There are places in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d38d7026a4fcd5e524b3d35e405d49e4ac8989c3/src/mongo/db/repl/rs_rollback.cpp#L1133&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;rollback&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d38d7026a4fcd5e524b3d35e405d49e4ac8989c3/src/mongo/db/repl/base_cloner.cpp#L254-L257&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;initial sync&lt;/a&gt;, we do check that sync source haven&apos;t rolled back during the process of rollback/initial sync using this rollback id. so, its necessary to update the rollback id on rollback success.&lt;/p&gt;

&lt;p&gt;Note: It&apos;s not problem for rollback via RTT as we currently increment the rollback id &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d38d7026a4fcd5e524b3d35e405d49e4ac8989c3/src/mongo/db/repl/rollback_impl.cpp#L227-L235&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;before&lt;/a&gt; the rollback start/oplog truncation.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1056535">SERVER-45178</key>
            <summary>Rollback via refetch can cause rollback to happen successfully w/o updating the rollback id.</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="vesselina.ratcheva@mongodb.com">Vesselina Ratcheva</assignee>
                                    <reporter username="suganthi.mani@mongodb.com">Suganthi Mani</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Dec 2019 18:16:08 +0000</created>
                <updated>Sun, 29 Oct 2023 22:13:59 +0000</updated>
                            <resolved>Fri, 14 Feb 2020 21:23:24 +0000</resolved>
                                                    <fixVersion>4.2.4</fixVersion>
                    <fixVersion>3.6.18</fixVersion>
                    <fixVersion>4.3.4</fixVersion>
                    <fixVersion>4.0.17</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="2909797" author="xgen-internal-githook" created="Wed, 26 Feb 2020 10:21:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;vessy-mongodb&apos;, &apos;name&apos;: &apos;Vesselina Ratcheva&apos;, &apos;email&apos;: &apos;vesselina.ratcheva@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-45178&quot; title=&quot;Rollback via refetch can cause rollback to happen successfully w/o updating the rollback id.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-45178&quot;&gt;&lt;del&gt;SERVER-45178&lt;/del&gt;&lt;/a&gt; Always update rollbackId before truncating oplog for rollback-via-refetch&lt;/p&gt;

&lt;p&gt; create mode 100644 jstests/replsets/rollback_via_refetch_update_rollback_id_before_oplog_truncation.js&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 04a2c9acc7ca061fb86736b377b897b11f6c7c48)&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1939a3ca2a29d22e7b9976171bf2cc54bd9a1846&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1939a3ca2a29d22e7b9976171bf2cc54bd9a1846&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2909753" author="xgen-internal-githook" created="Wed, 26 Feb 2020 09:30:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;vessy-mongodb&apos;, &apos;name&apos;: &apos;Vesselina Ratcheva&apos;, &apos;email&apos;: &apos;vesselina.ratcheva@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-45178&quot; title=&quot;Rollback via refetch can cause rollback to happen successfully w/o updating the rollback id.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-45178&quot;&gt;&lt;del&gt;SERVER-45178&lt;/del&gt;&lt;/a&gt; Always update rollbackId before truncating oplog for rollback-via-refetch&lt;/p&gt;

&lt;p&gt; create mode 100644 jstests/replsets/rollback_via_refetch_update_rollback_id_before_oplog_truncation.js&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 04a2c9acc7ca061fb86736b377b897b11f6c7c48)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9e69da32cea83fc45724213215a8de40d2635f45&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9e69da32cea83fc45724213215a8de40d2635f45&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2909698" author="xgen-internal-githook" created="Wed, 26 Feb 2020 07:57:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;vessy-mongodb&apos;, &apos;name&apos;: &apos;Vesselina Ratcheva&apos;, &apos;email&apos;: &apos;vesselina.ratcheva@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-45178&quot; title=&quot;Rollback via refetch can cause rollback to happen successfully w/o updating the rollback id.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-45178&quot;&gt;&lt;del&gt;SERVER-45178&lt;/del&gt;&lt;/a&gt; Always update rollbackId before truncating oplog for rollback-via-refetch&lt;/p&gt;

&lt;p&gt; create mode 100644 jstests/replsets/rollback_via_refetch_update_rollback_id_before_oplog_truncation.js&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 04a2c9acc7ca061fb86736b377b897b11f6c7c48)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f74e24b16ec0cae0d1521c34379a0e0854cd4607&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f74e24b16ec0cae0d1521c34379a0e0854cd4607&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2879483" author="xgen-internal-githook" created="Fri, 14 Feb 2020 21:17:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Vesselina Ratcheva&apos;, &apos;username&apos;: &apos;vessy-mongodb&apos;, &apos;email&apos;: &apos;vesselina.ratcheva@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-45178&quot; title=&quot;Rollback via refetch can cause rollback to happen successfully w/o updating the rollback id.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-45178&quot;&gt;&lt;del&gt;SERVER-45178&lt;/del&gt;&lt;/a&gt; Always update rollbackId before truncating oplog for rollback-via-refetch&lt;/p&gt;

&lt;p&gt; create mode 100644 jstests/replsets/rollback_via_refetch_update_rollback_id_before_oplog_truncation.js&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/04a2c9acc7ca061fb86736b377b897b11f6c7c48&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/04a2c9acc7ca061fb86736b377b897b11f6c7c48&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="885460">SERVER-42650</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="344968">SERVER-27659</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="240560" name="repro.patch" size="4062" author="suganthi.mani@mongodb.com" created="Mon, 16 Dec 2019 19:59:59 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16775"><![CDATA[v4.2]]></customfieldvalue>
    <customfieldvalue key="15640"><![CDATA[v4.0]]></customfieldvalue>
    <customfieldvalue key="15141"><![CDATA[v3.6]]></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>Mon, 30 Dec 2019 18:49:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 50 weeks 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 50 weeks 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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>suganthi.mani@mongodb.com</customfieldvalue>
            <customfieldvalue>vesselina.ratcheva@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hwbivb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwbvh3:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3575">Repl 2020-02-10</customfieldvalue>
    <customfieldvalue id="3576">Repl 2020-02-24</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|hwb54n:</customfieldvalue>

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