<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:56:36 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-62987] Wrong replication logic on refreshes on secondary nodes</title>
                <link>https://jira.mongodb.org/browse/SERVER-62987</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The way we do refreshes on secondaries is defined by two steps:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The secondary node asks to the primary node to do a refresh with local write concern.&lt;/li&gt;
	&lt;li&gt;The secondary node waits until the changes done by the primary are replicated.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The issue is how we implement the second step: we are waiting on the logical time (just a time, without the term component) associated with the oplog entry generated on the primary node. Note that this entry hasn&apos;t been majority committed, so it could totally happen that another node steps up, does some writes and at some point this entry is rollbacked. Then, at some point the secondary node might fetch an oplog entry with a logical time bigger than the one it was waiting, and it will assume that it has the changes associated with the refresh on the primary. However that&apos;s not true.&lt;/p&gt;

&lt;p&gt;Under that scenario it might happen that the &lt;tt&gt;ShardServerCatalogCacheLoader&lt;/tt&gt; returns some metadata associated with a CollectionVersion older than what the &lt;tt&gt;CatalogCache&lt;/tt&gt; already knows. Then, the &lt;tt&gt;CatalogCache&lt;/tt&gt; will try to combine the &lt;tt&gt;SSCCL&lt;/tt&gt; result with its local metadatada, creating &lt;a href=&quot;https://github.com/10gen/mongo/blob/7c61a98ce1503e51a1b539fb285a2e4fadc58108/src/mongo/s/catalog_cache.cpp#L603-L606&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;an inconsistent routing history&lt;/a&gt;: it will potentially contain the collection metadata we got from the &lt;tt&gt;SSCCL&lt;/tt&gt; but the chunks we already had in the &lt;tt&gt;CatalogCache&lt;/tt&gt;. Thus, the problem is that the new routing history has stale collection information.&lt;/p&gt;

&lt;p&gt;We believe that this could be potentially problematic for the two fields we have in &lt;tt&gt;config.collections&lt;/tt&gt; that are mutable and replicated to shards: &lt;tt&gt;allowMigrations&lt;/tt&gt; and &lt;tt&gt;reshardingFields&lt;/tt&gt;.&lt;/p&gt;


&lt;hr /&gt;

&lt;p&gt;Which is the behavior under this scenario? In the 5.0 binary &lt;a href=&quot;https://github.com/10gen/mongo/blob/7c61a98ce1503e51a1b539fb285a2e4fadc58108/src/mongo/s/catalog_cache.cpp#L648-L663&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;we would hit one of these two invariants&lt;/a&gt; stating that we found different collection information for the same collection version. In 5.1 or more recent versions the &lt;tt&gt;CatalogCache&lt;/tt&gt; is not going to throw an invariant, so users might experience incorrect executions of the ongoing DDL operations.&lt;/p&gt;


&lt;p&gt;Affected versions: I took a look at 3.6 and already has this problem.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1971099">SERVER-62987</key>
            <summary>Wrong replication logic on refreshes on secondary nodes</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="allison.easton@mongodb.com">Allison Easton</assignee>
                                    <reporter username="sergi.mateo-bellido@mongodb.com">Sergi Mateo Bellido</reporter>
                        <labels>
                            <label>SSCCL-BUG</label>
                    </labels>
                <created>Wed, 26 Jan 2022 08:28:37 +0000</created>
                <updated>Sun, 29 Oct 2023 21:43:37 +0000</updated>
                            <resolved>Thu, 6 Jul 2023 11:47:49 +0000</resolved>
                                                    <fixVersion>7.1.0-rc0</fixVersion>
                    <fixVersion>7.0.1</fixVersion>
                    <fixVersion>5.0.20</fixVersion>
                    <fixVersion>6.0.9</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5642612" author="xgen-internal-githook" created="Fri, 18 Aug 2023 11:10:43 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Allison Easton&apos;, &apos;email&apos;: &apos;allison.easton@mongodb.com&apos;, &apos;username&apos;: &apos;allisoneaston&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62987&quot; title=&quot;Wrong replication logic on refreshes on secondary nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62987&quot;&gt;&lt;del&gt;SERVER-62987&lt;/del&gt;&lt;/a&gt; Secondary refreshes should be interrupted on replication rollback&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 2196021e412bb0ad1c470f4ba664551a9bbb56fe)&lt;br/&gt;
Branch: v7.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/355e304a60e1fd3783eed52314c8ea0505deb9f9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/355e304a60e1fd3783eed52314c8ea0505deb9f9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5579058" author="xgen-internal-githook" created="Thu, 20 Jul 2023 09:14:50 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Allison Easton&apos;, &apos;email&apos;: &apos;allison.easton@mongodb.com&apos;, &apos;username&apos;: &apos;allisoneaston&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62987&quot; title=&quot;Wrong replication logic on refreshes on secondary nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62987&quot;&gt;&lt;del&gt;SERVER-62987&lt;/del&gt;&lt;/a&gt; Secondary refreshes should be interrupted on replication rollback&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 2196021e412bb0ad1c470f4ba664551a9bbb56fe)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f6c48222cc1cf0c68935a3414f79067687059d1a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f6c48222cc1cf0c68935a3414f79067687059d1a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5579030" author="xgen-internal-githook" created="Thu, 20 Jul 2023 09:08:36 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Allison Easton&apos;, &apos;email&apos;: &apos;allison.easton@mongodb.com&apos;, &apos;username&apos;: &apos;allisoneaston&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62987&quot; title=&quot;Wrong replication logic on refreshes on secondary nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62987&quot;&gt;&lt;del&gt;SERVER-62987&lt;/del&gt;&lt;/a&gt; Secondary refreshes should be interrupted on replication rollback&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 2196021e412bb0ad1c470f4ba664551a9bbb56fe)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e6e00002c258c9f0177cf37ec196493f05e7ec96&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e6e00002c258c9f0177cf37ec196493f05e7ec96&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5546833" author="xgen-internal-githook" created="Thu, 6 Jul 2023 11:26:45 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Allison Easton&apos;, &apos;email&apos;: &apos;allison.easton@mongodb.com&apos;, &apos;username&apos;: &apos;allisoneaston&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62987&quot; title=&quot;Wrong replication logic on refreshes on secondary nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62987&quot;&gt;&lt;del&gt;SERVER-62987&lt;/del&gt;&lt;/a&gt; Secondary refreshes should be interrupted on replication rollback&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2196021e412bb0ad1c470f4ba664551a9bbb56fe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2196021e412bb0ad1c470f4ba664551a9bbb56fe&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">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </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>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25133"><![CDATA[Sharding EMEA]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25578"><![CDATA[v7.0]]></customfieldvalue>
    <customfieldvalue key="23470"><![CDATA[v6.0]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.0]]></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>Thu, 27 Jan 2022 12:10:08 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        24 weeks, 5 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_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>
                            24 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>allison.easton@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>sergi.mateo-bellido@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0i35j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i016mf:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7190">Sharding EMEA 2023-07-10</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|i0hpav:</customfieldvalue>

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