<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:52:28 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-61461] update_shard_key_doc_moves_shards.js fails due to spurious refreshes from secondaries</title>
                <link>https://jira.mongodb.org/browse/SERVER-61461</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;b&gt;Background&lt;/b&gt;&lt;br/&gt;
&lt;a href=&quot;https://docs.mongodb.com/manual/replication/#std-label-mirrored-reads&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Mirrored Reads&lt;/a&gt; were introduced in 4.4. They &quot;mirror&quot; a read from the primary to the secondary as well. If the read that gets sent to the secondary has an older shard version than it expects, it will send a command to the primary to refresh.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Problem&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The test calls &lt;b&gt;refreshCatalogCacheForNs&lt;/b&gt; in order to make sure that the nodes are consistently refreshed. While this refreshes the primary, it does not refresh the secondary. This means that, due to mirrored reads, we could get spurious and unexpected refreshes on the primary. &lt;/p&gt;

&lt;p&gt;There are a few possible solutions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Make the test not run with mirrored reads (not a good idea IMO)&lt;/li&gt;
	&lt;li&gt;Make the test more resilient to background refreshes (even something as basic as retrying)&lt;/li&gt;
	&lt;li&gt;Make the test refresh the secondaries alongside the primaries&lt;/li&gt;
	&lt;li&gt;Update the refresh logic so that the secondary sends the shardVersion which made the secondary trigger a refresh. This way the primary can check whether or not it needs to refresh&lt;/li&gt;
	&lt;li&gt;To automatically retry the operation using the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/337e43030afb6de83a2e3ed25575ec8874a70d20/jstests/libs/auto_retry_transaction_in_sharding.js&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;auto retry logic&lt;/a&gt;. Specifically we could use &lt;b&gt;withTxnAndAutoRetryOnMongos&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1924401">SERVER-61461</key>
            <summary>update_shard_key_doc_moves_shards.js fails due to spurious refreshes from secondaries</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="luis.osta@mongodb.com">Luis Osta</assignee>
                                    <reporter username="luis.osta@mongodb.com">Luis Osta</reporter>
                        <labels>
                            <label>sharding-nyc-subteam1</label>
                    </labels>
                <created>Fri, 12 Nov 2021 21:45:06 +0000</created>
                <updated>Sun, 29 Oct 2023 21:46:05 +0000</updated>
                            <resolved>Thu, 2 Dec 2021 16:01:48 +0000</resolved>
                                                    <fixVersion>5.2.0</fixVersion>
                    <fixVersion>5.0.6</fixVersion>
                    <fixVersion>4.4.11</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="4228252" author="xgen-internal-githook" created="Thu, 2 Dec 2021 21:10:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Luis Osta&apos;, &apos;email&apos;: &apos;luis.osta@mongodb.com&apos;, &apos;username&apos;: &apos;LuisOsta&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61461&quot; title=&quot;update_shard_key_doc_moves_shards.js fails due to spurious refreshes from secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61461&quot;&gt;&lt;del&gt;SERVER-61461&lt;/del&gt;&lt;/a&gt; Increase &apos;maxTransactionLockRequestTimeoutMillis&apos; for tests&lt;/p&gt;

&lt;p&gt;(cherry picked from commit c3402c98def4ce8b25609429ccb9e24fb4fe7cd0)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b93b508db2e180fe8e2ae6284ce9e8ef5b091cec&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b93b508db2e180fe8e2ae6284ce9e8ef5b091cec&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4228146" author="xgen-internal-githook" created="Thu, 2 Dec 2021 20:45:11 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Luis Osta&apos;, &apos;email&apos;: &apos;luis.osta@mongodb.com&apos;, &apos;username&apos;: &apos;LuisOsta&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61461&quot; title=&quot;update_shard_key_doc_moves_shards.js fails due to spurious refreshes from secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61461&quot;&gt;&lt;del&gt;SERVER-61461&lt;/del&gt;&lt;/a&gt; Increase &apos;maxTransactionLockRequestTimeoutMillis&apos; for tests&lt;/p&gt;

&lt;p&gt;(cherry picked from commit c3402c98def4ce8b25609429ccb9e24fb4fe7cd0)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d4b800c330d8c713d26b0828fe39e046bac5ba03&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d4b800c330d8c713d26b0828fe39e046bac5ba03&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4227786" author="xgen-internal-githook" created="Thu, 2 Dec 2021 18:59:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Luis Osta&apos;, &apos;email&apos;: &apos;luis.osta@mongodb.com&apos;, &apos;username&apos;: &apos;LuisOsta&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61461&quot; title=&quot;update_shard_key_doc_moves_shards.js fails due to spurious refreshes from secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61461&quot;&gt;&lt;del&gt;SERVER-61461&lt;/del&gt;&lt;/a&gt; Increase &apos;maxTransactionLockRequestTimeoutMillis&apos; for tests&lt;/p&gt;

&lt;p&gt;(cherry picked from commit c3402c98def4ce8b25609429ccb9e24fb4fe7cd0)&lt;br/&gt;
Branch: v5.1&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/cf88e3f42ac9fd463fc8332961dca61ab9b0c102&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/cf88e3f42ac9fd463fc8332961dca61ab9b0c102&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4226908" author="xgen-internal-githook" created="Thu, 2 Dec 2021 15:19:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Luis Osta&apos;, &apos;email&apos;: &apos;luis.osta@mongodb.com&apos;, &apos;username&apos;: &apos;LuisOsta&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61461&quot; title=&quot;update_shard_key_doc_moves_shards.js fails due to spurious refreshes from secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61461&quot;&gt;&lt;del&gt;SERVER-61461&lt;/del&gt;&lt;/a&gt; Increase &apos;maxTransactionLockRequestTimeoutMillis&apos; for tests&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c3402c98def4ce8b25609429ccb9e24fb4fe7cd0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c3402c98def4ce8b25609429ccb9e24fb4fe7cd0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4215687" author="max.hirschhorn@10gen.com" created="Mon, 29 Nov 2021 20:31:26 +0000"  >&lt;p&gt;After discussing this ticket in our storypointing meeting, it seems like we could instead raise the &lt;tt&gt;maxTransactionLockRequestTimeoutMillis&lt;/tt&gt; server parameter on the &lt;em&gt;shards&lt;/em&gt; (analogous to what &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48651&quot; title=&quot;Avoid lock timeout errors in refine_collection_shard_key_basic.js&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48651&quot;&gt;&lt;del&gt;SERVER-48651&lt;/del&gt;&lt;/a&gt; did on the config server) to prevent the spurious shard version refresh triggered by the secondaries from causing the transaction to fail with a LockTimeout error. This way we can continue to have the test client not retry on transient transaction errors. We would need to make such a change to all of&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;jstests/sharding/update&amp;#95;shard&amp;#95;key&amp;#95;doc&amp;#95;moves&amp;#95;shards.js&lt;/li&gt;
	&lt;li&gt;jstests/sharding/update&amp;#95;shard&amp;#95;key&amp;#95;doc&amp;#95;on&amp;#95;same&amp;#95;shard.js&lt;/li&gt;
	&lt;li&gt;jstests/sharding/update&amp;#95;shard&amp;#95;key&amp;#95;pipeline&amp;#95;update.js&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;which use the jstests/sharding/libs/update&amp;#95;shard&amp;#95;key&amp;#95;helpers.js library and have been observed to fail. (The jstests/sharding/update&amp;#95;compound&amp;#95;shard&amp;#95;key.js test hasn&apos;t been observed to fail.)&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">
                                        <issuelink>
            <issuekey id="1980415">SERVER-63493</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.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="22495"><![CDATA[v5.1]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.0]]></customfieldvalue>
    <customfieldvalue key="18953"><![CDATA[v4.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 29 Nov 2021 20:31:26 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>luis.osta@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0a6jz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hztl0n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5226">Sharding 2021-11-29</customfieldvalue>
    <customfieldvalue id="5227">Sharding 2021-12-13</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</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|i09spb:</customfieldvalue>

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