<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:35:06 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-33954] CatalogCache refresh methods are not causally consistent</title>
                <link>https://jira.mongodb.org/browse/SERVER-33954</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The CatalogCache refresh methods have a logic that will simply &apos;join&apos; with an another thread if there is already another thread trying to refresh the same collection. This will cause the refresh to miss the changes that happened at Tn if the refresh method was called while an in-progress refresh started at Tn-1.&lt;/p&gt;

&lt;p&gt;Here&apos;s a concrete example based on the build failure:&lt;br/&gt;
1. moveChunk command is called.&lt;br/&gt;
2. At the end of the migration, source shardA &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.7.3/src/mongo/db/s/migration_source_manager.cpp#L600&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sends setShardVersion command to recipient shardB asynchronously&lt;/a&gt;.&lt;br/&gt;
3. setShardVersion command triggers a CatalogCache refresh at shardB.&lt;br/&gt;
4. Since step 3 is happening asynchronously, the test can proceed to dropping the collection.&lt;br/&gt;
5. At the final step of drop is to send setShardVersion (0, 0) to shards.&lt;br/&gt;
6. When setShardVersion arrives at shardB while step 3 is still refreshing, it will simply join with it and get an old info where the collection has not dropped yet.&lt;br/&gt;
7. setShardVersion on drop fails since version (0, 0) would not match the version found in the refresh.&lt;/p&gt;

&lt;p&gt;Original description:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;After `test.foo` is dropped, the drop is not reflected in the catalogCache. After refreshing, the shard logs that it refreshed from the old version: &lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Refresh for collection test.foo took 92 ms and found version 3|0||5aac36f988c1f30185b7b1df&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt; and the test fails because when trying to setShardVersion during the drop, the correct version is sent (version 0|0||000000000000000000000000), but the incorrect version is found.&lt;/p&gt;

&lt;p&gt;Attached is the test to reproduce the error as well as the logs.&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="512791">SERVER-33954</key>
            <summary>CatalogCache refresh methods are not causally consistent</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="matthew.saltz@mongodb.com">Matthew Saltz</assignee>
                                    <reporter username="janna.golden@mongodb.com">Janna Golden</reporter>
                        <labels>
                            <label>ShardingTechDebt</label>
                            <label>todo_in_code</label>
                    </labels>
                <created>Fri, 16 Mar 2018 22:06:41 +0000</created>
                <updated>Sun, 29 Oct 2023 22:33:38 +0000</updated>
                            <resolved>Tue, 5 Jun 2018 19:24:09 +0000</resolved>
                                    <version>3.6.3</version>
                    <version>3.7.3</version>
                                    <fixVersion>4.0.0-rc3</fixVersion>
                    <fixVersion>4.1.1</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1911664" author="xgen-internal-githook" created="Tue, 5 Jun 2018 19:43:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matthew Saltz&apos;, &apos;email&apos;: &apos;matthew.saltz@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33954&quot; title=&quot;CatalogCache refresh methods are not causally consistent&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33954&quot;&gt;&lt;del&gt;SERVER-33954&lt;/del&gt;&lt;/a&gt; Modified getCollectionRoutingInfoWithRefresh to refresh twice if the first refresh is not performed by its own thread&lt;/p&gt;

&lt;p&gt;(cherry picked from commit b93fe0e61bf7e8bc96da2edeb66afa1b915b0b77)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8aa6f18081ac029e4514082d434f99fb57f8d630&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8aa6f18081ac029e4514082d434f99fb57f8d630&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1911627" author="xgen-internal-githook" created="Tue, 5 Jun 2018 19:19:51 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matthew Saltz&apos;, &apos;email&apos;: &apos;matthew.saltz@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33954&quot; title=&quot;CatalogCache refresh methods are not causally consistent&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33954&quot;&gt;&lt;del&gt;SERVER-33954&lt;/del&gt;&lt;/a&gt; Modified getCollectionRoutingInfoWithRefresh to refresh twice if the first refresh is not performed by its own thread&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b93fe0e61bf7e8bc96da2edeb66afa1b915b0b77&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b93fe0e61bf7e8bc96da2edeb66afa1b915b0b77&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1874961" author="xgen-internal-githook" created="Thu, 26 Apr 2018 15:00:58 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;matthew.saltz@mongodb.com&apos;, &apos;name&apos;: &apos;Matthew Saltz&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33954&quot; title=&quot;CatalogCache refresh methods are not causally consistent&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33954&quot;&gt;&lt;del&gt;SERVER-33954&lt;/del&gt;&lt;/a&gt; Modified getDatabaseWithRefresh/getCollectionRoutingInfoWithRefresh to refresh twice if the first refresh is not performed by its own thread&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit a000fcd684216a331356a3c1568ef7fa99ea4907.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/316bcc98e2b89e266493612ee1cf4680a0265e0f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/316bcc98e2b89e266493612ee1cf4680a0265e0f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1872624" author="matthew.saltz" created="Tue, 24 Apr 2018 14:54:21 +0000"  >&lt;p&gt;Note to self: After discussing with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.maharishi&quot; class=&quot;user-hover&quot; rel=&quot;esha.maharishi&quot;&gt;esha.maharishi&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=renctan&quot; class=&quot;user-hover&quot; rel=&quot;renctan&quot;&gt;renctan&lt;/a&gt;, I need to go back and look at where getCollectionRoutingInfoWithRefresh to ensure it&apos;s not called anywhere that will be problematic for performance&lt;/p&gt;</comment>
                            <comment id="1871389" author="xgen-internal-githook" created="Mon, 23 Apr 2018 15:08:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;matthew.saltz@mongodb.com&apos;, &apos;name&apos;: &apos;Matthew Saltz&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33954&quot; title=&quot;CatalogCache refresh methods are not causally consistent&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33954&quot;&gt;&lt;del&gt;SERVER-33954&lt;/del&gt;&lt;/a&gt; Modified getDatabaseWithRefresh/getCollectionRoutingInfoWithRefresh to refresh twice if the first refresh is not performed by its own thread&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a000fcd684216a331356a3c1568ef7fa99ea4907&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a000fcd684216a331356a3c1568ef7fa99ea4907&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1855607" author="renctan" created="Wed, 4 Apr 2018 20:37:12 +0000"  >&lt;p&gt;Attaching repro.diff and test.js that can easily reproduce this issue.&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="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="448677">SERVER-31659</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="935640">SERVER-43520</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="183425" name="repro.diff" size="1192" author="randolph@mongodb.com" created="Wed, 4 Apr 2018 20:35:52 +0000"/>
                            <attachment id="181909" name="stale_mongos_updates_and_removes.js" size="10301" author="janna.golden@mongodb.com" created="Fri, 16 Mar 2018 22:10:10 +0000"/>
                            <attachment id="181910" name="stalemongosfail.txt" size="1281328" author="janna.golden@mongodb.com" created="Fri, 16 Mar 2018 22:10:10 +0000"/>
                            <attachment id="183426" name="test.js" size="1033" author="randolph@mongodb.com" created="Wed, 4 Apr 2018 20:36:01 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <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>Wed, 4 Apr 2018 20:37:12 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>janna.golden@mongodb.com</customfieldvalue>
            <customfieldvalue>matthew.saltz@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htswsn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8mrb:</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="2216">Sharding 2018-04-09</customfieldvalue>
    <customfieldvalue id="2217">Sharding 2018-04-23</customfieldvalue>
    <customfieldvalue id="2257">Sharding 2018-05-07</customfieldvalue>
    <customfieldvalue id="2290">Sharding 2018-05-21</customfieldvalue>
    <customfieldvalue id="2291">Sharding 2018-06-04</customfieldvalue>
    <customfieldvalue id="2292">Sharding 2018-06-18</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|htsizz:</customfieldvalue>

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