<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:46:42 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-81508] Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown</title>
                <link>https://jira.mongodb.org/browse/SERVER-81508</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Write commands currently &lt;a href=&quot;https://github.com/mongodb/mongo/blob/be38579dc72a40988cada1f43ab6695dcff8cc36/src/mongo/db/ops/write_ops_exec.cpp#L542-L544&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;throw&lt;/a&gt; &lt;tt&gt;ShardCannotRefreshDueToLocksHeld&lt;/tt&gt; as a top-level command error (i.e. ok: 0 with &lt;tt&gt;ShardCannotRefreshDueToLocksHeld&lt;/tt&gt;). Additionally, mongos/shard may &lt;a href=&quot;https://github.com/mongodb/mongo/blob/be38579dc72a40988cada1f43ab6695dcff8cc36/src/mongo/db/service_entry_point_common.cpp#L2012-L2035&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;retry&lt;/a&gt; a command upon &lt;tt&gt;ShardCannotRefreshDueToLocksHeld&lt;/tt&gt; error. And this is problematic if refreshing the cache fails with ShardCannotRefreshDueToLocksHeld in between write statements (e.g. flushRouterConfig is a user-facing command which could cause the CatalogCache to become stale for the temporary resharding collection). This is because some write statements may have been done before ShardCannotRefreshDueToLocksHeld was thrown and retrying the entire command may cause double execution for those write statements.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2453040">SERVER-81508</key>
            <summary>Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown</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="paolo.polato@mongodb.com">Paolo Polato</assignee>
                                    <reporter username="lingzhi.deng@mongodb.com">Lingzhi Deng</reporter>
                        <labels>
                            <label>shardingemea-qw</label>
                    </labels>
                <created>Wed, 27 Sep 2023 20:26:02 +0000</created>
                <updated>Thu, 11 Jan 2024 23:02:14 +0000</updated>
                            <resolved>Thu, 16 Nov 2023 09:11:43 +0000</resolved>
                                    <version>5.0.0</version>
                    <version>6.0.0</version>
                    <version>7.0.0</version>
                    <version>7.1.0-rc3</version>
                                    <fixVersion>7.2.1</fixVersion>
                    <fixVersion>7.3.0-rc0</fixVersion>
                    <fixVersion>7.1.2</fixVersion>
                    <fixVersion>7.0.6</fixVersion>
                    <fixVersion>5.0.25</fixVersion>
                    <fixVersion>6.0.14</fixVersion>
                                    <component>Sharding</component>
                    <component>Write Ops</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="6003058" author="xgen-internal-githook" created="Thu, 11 Jan 2024 08:42:10 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Paolo Polato&apos;, &apos;email&apos;: &apos;paolo.polato@mongodb.com&apos;, &apos;username&apos;: &apos;ppolato&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81508&quot; title=&quot;Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81508&quot;&gt;&lt;del&gt;SERVER-81508&lt;/del&gt;&lt;/a&gt; Avoid double execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit e175711195ce55401a2833dfbc30ee515599a2bc)&lt;br/&gt;
(cherry picked from commit c0aa44439617e549df55d4b3bb06c2e7af68f3b5)&lt;br/&gt;
(cherry picked from commit ba9e3277b29b52bf8003a79696f9af9571e765ba)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: 523bc79834ccd2741627e1247c18e33482e58ae0&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/59613bd614abdba6d134ab40338dcc4a64f9166c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/59613bd614abdba6d134ab40338dcc4a64f9166c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="6000731" author="xgen-internal-githook" created="Wed, 10 Jan 2024 15:50:08 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Paolo Polato&apos;, &apos;email&apos;: &apos;paolo.polato@mongodb.com&apos;, &apos;username&apos;: &apos;ppolato&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81508&quot; title=&quot;Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81508&quot;&gt;&lt;del&gt;SERVER-81508&lt;/del&gt;&lt;/a&gt; Avoid double execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit e175711195ce55401a2833dfbc30ee515599a2bc)&lt;br/&gt;
(cherry picked from commit c0aa44439617e549df55d4b3bb06c2e7af68f3b5)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: ba9e3277b29b52bf8003a79696f9af9571e765ba&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9ab048518c9cf6f3960dc39bbd6ee586b96d0484&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9ab048518c9cf6f3960dc39bbd6ee586b96d0484&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5993815" author="xgen-internal-githook" created="Mon, 8 Jan 2024 13:56:29 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Paolo Polato&apos;, &apos;email&apos;: &apos;paolo.polato@mongodb.com&apos;, &apos;username&apos;: &apos;ppolato&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81508&quot; title=&quot;Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81508&quot;&gt;&lt;del&gt;SERVER-81508&lt;/del&gt;&lt;/a&gt; Avoid double execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit e175711195ce55401a2833dfbc30ee515599a2bc)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: c0aa44439617e549df55d4b3bb06c2e7af68f3b5&lt;br/&gt;
Branch: v7.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/856896c448d3cb8867eb2bd90d0b58159a18f799&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/856896c448d3cb8867eb2bd90d0b58159a18f799&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5993442" author="xgen-internal-githook" created="Mon, 8 Jan 2024 11:55:43 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Paolo Polato&apos;, &apos;email&apos;: &apos;paolo.polato@mongodb.com&apos;, &apos;username&apos;: &apos;ppolato&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81508&quot; title=&quot;Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81508&quot;&gt;&lt;del&gt;SERVER-81508&lt;/del&gt;&lt;/a&gt; Avoid double execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bec596c52e0c524fe835eac39c47d6db831e0493)&lt;br/&gt;
Branch: v7.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/38498d0d5adc78c8b31b1b0f3a704b538e85e5c1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/38498d0d5adc78c8b31b1b0f3a704b538e85e5c1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5961500" author="xgen-internal-githook" created="Tue, 19 Dec 2023 22:26:20 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Paolo Polato&apos;, &apos;email&apos;: &apos;paolo.polato@mongodb.com&apos;, &apos;username&apos;: &apos;ppolato&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81508&quot; title=&quot;Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81508&quot;&gt;&lt;del&gt;SERVER-81508&lt;/del&gt;&lt;/a&gt; Avoid double execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bec596c52e0c524fe835eac39c47d6db831e0493)&lt;br/&gt;
Branch: v7.1&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e175711195ce55401a2833dfbc30ee515599a2bc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e175711195ce55401a2833dfbc30ee515599a2bc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5883097" author="xgen-internal-githook" created="Wed, 15 Nov 2023 20:10:40 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Paolo Polato&apos;, &apos;email&apos;: &apos;paolo.polato@mongodb.com&apos;, &apos;username&apos;: &apos;ppolato&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81508&quot; title=&quot;Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81508&quot;&gt;&lt;del&gt;SERVER-81508&lt;/del&gt;&lt;/a&gt; Avoid double execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bec596c52e0c524fe835eac39c47d6db831e0493&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bec596c52e0c524fe835eac39c47d6db831e0493&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1599670">SERVER-54020</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="484247" name="SERVER-81508.repro.patch" size="6878" author="paolo.polato@mongodb.com" created="Fri, 20 Oct 2023 11:07:34 +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>4.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="26553"><![CDATA[v7.2]]></customfieldvalue>
    <customfieldvalue key="26243"><![CDATA[v7.1]]></customfieldvalue>
    <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_23577" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>CAR Impact</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25717"><![CDATA[4 Data loss/Availability]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 29 Sep 2023 12:53:47 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 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>maria.prinus@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 weeks, 6 days 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>lingzhi.deng@mongodb.com</customfieldvalue>
            <customfieldvalue>paolo.polato@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2see7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2ac2k:</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_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="7720">Sharding EMEA 2023-10-16</customfieldvalue>
    <customfieldvalue id="7721">Sharding EMEA 2023-10-30</customfieldvalue>
    <customfieldvalue id="7888">CAR Team 2023-11-13</customfieldvalue>
    <customfieldvalue id="7889">CAR Team 2023-11-27</customfieldvalue>

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

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