<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:49:26 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-60291] Resharding Prohibited Commands Does Not Wait For The Recipient To Be Done</title>
                <link>https://jira.mongodb.org/browse/SERVER-60291</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;b&gt;Context&lt;/b&gt;&lt;br/&gt;
When the ReshardingRecipientService, marks itself as done. It will update it&apos;s local in memory representation of the state. But that will not lead to the rest of the recipient&apos;s in memory state to know that the recipient is finished. This is because it uses the CollectionMetadata to know the state of the operation.&lt;/p&gt;

&lt;p&gt;The recipient&apos;s CollectionMetadata isn&apos;t updated until the coordinator sends a commands to the participants of the resharding operation to refresh.&lt;/p&gt;

&lt;p&gt;So any calls to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/466ec4859c2391e1b4d3413297b95ade2c1e76b1/src/mongo/db/s/collection_metadata.cpp#L97&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;throwIfReshardingInProgress&lt;/a&gt; will not necessarily reflect the state of the ReshardingRecipientService but instead reflect the state of the recipient since the last refresh.&lt;/p&gt;

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

&lt;p&gt;The &lt;b&gt;resharding_prohibited_commands.js&lt;/b&gt; relies on updates to the cache.collections collection (which has caused problems in the past, see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-59694&quot; title=&quot;Resharding Prohibited Commands Incorrectly Assumes Consistency In Config.Cache.Collections Collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-59694&quot;&gt;&lt;del&gt;SERVER-59694&lt;/del&gt;&lt;/a&gt;), it will allow all of the commands that are prohibited during resharding to be executed before the CollectionMetadata of the recipient has been updated. &lt;/p&gt;

&lt;p&gt;Hence when the &lt;b&gt;colldMod&lt;/b&gt; command was executed the &lt;b&gt;throwIfReshardingInProgress&lt;/b&gt; function received reshardingFields that have not been updated to reflect the move to done by the ReshardingRecipientService.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Possible Solution&lt;/b&gt;&lt;br/&gt;
The test needs to be updated to not rely on the &lt;b&gt;cache.collections&lt;/b&gt; as that doesn&apos;t have a strong relation to when the recipient is &lt;b&gt;actually&lt;/b&gt; done. &lt;/p&gt;

&lt;p&gt;We should either join the resharding operation and wait until it is done. Or take some other measure to determine whether or not the recipient is fully &quot;done&quot;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1885630">SERVER-60291</key>
            <summary>Resharding Prohibited Commands Does Not Wait For The Recipient To Be Done</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>
                    </labels>
                <created>Tue, 28 Sep 2021 20:40:22 +0000</created>
                <updated>Sun, 29 Oct 2023 21:48:05 +0000</updated>
                            <resolved>Tue, 5 Oct 2021 21:35:20 +0000</resolved>
                                                    <fixVersion>5.2.0</fixVersion>
                    <fixVersion>5.0.4</fixVersion>
                    <fixVersion>5.1.0-rc0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="4110067" author="xgen-internal-githook" created="Thu, 7 Oct 2021 13:37: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-60291&quot; title=&quot;Resharding Prohibited Commands Does Not Wait For The Recipient To Be Done&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-60291&quot;&gt;&lt;del&gt;SERVER-60291&lt;/del&gt;&lt;/a&gt; Move success case to outside of withReshardingInBackground&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/56ea1c7d56fd520a99e4dc386fbb57af1b51ba7e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/56ea1c7d56fd520a99e4dc386fbb57af1b51ba7e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4108594" author="xgen-internal-githook" created="Wed, 6 Oct 2021 20:10:09 +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-60291&quot; title=&quot;Resharding Prohibited Commands Does Not Wait For The Recipient To Be Done&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-60291&quot;&gt;&lt;del&gt;SERVER-60291&lt;/del&gt;&lt;/a&gt; Move success case to outside of withReshardingInBackground&lt;br/&gt;
Branch: v5.1&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/dded3f27cb82437472885c8555c302e09e114e1e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/dded3f27cb82437472885c8555c302e09e114e1e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4103746" author="xgen-internal-githook" created="Tue, 5 Oct 2021 21:20:46 +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-60291&quot; title=&quot;Resharding Prohibited Commands Does Not Wait For The Recipient To Be Done&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-60291&quot;&gt;&lt;del&gt;SERVER-60291&lt;/del&gt;&lt;/a&gt; Move success case to outside of withReshardingInBackground&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/6d94bfbcecaed86ba2d9e9491a1f68dd34d1fc6c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/6d94bfbcecaed86ba2d9e9491a1f68dd34d1fc6c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4096531" author="JIRAUSER1253452" created="Fri, 1 Oct 2021 14:17:03 +0000"  >&lt;p&gt;So after talking with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=janna.golden&quot; class=&quot;user-hover&quot; rel=&quot;janna.golden&quot;&gt;janna.golden&lt;/a&gt;, it became clear that just waiting for the resharding operation to complete won&apos;t actually maintain the same contract the test is supposed to have. This tests that the commands should be allowed right after the coordinator persists the decision even if the full operation hasn&apos;t completed yet.&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>
                    </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>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>
    
                        </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>Fri, 1 Oct 2021 21:09:01 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 17 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-234</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, 17 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>35.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>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i03jm7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hznbtr:</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="5222">Sharding 2021-10-04</customfieldvalue>
    <customfieldvalue id="5223">Sharding 2021-10-18</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;ol&gt;
	&lt;li&gt;ReshardingRecipientService marks itself as done&lt;/li&gt;
	&lt;li&gt;Put a sleep on the ReshardingCoordinatorService such that it never tells the participants to refresh&lt;/li&gt;
	&lt;li&gt;Run the resharding_prohibited_commands.js test&lt;/li&gt;
	&lt;li&gt;Because it relies on the cache.collections it will continue as if the recipient has finished. But because the CollectionMetadata hasn&apos;t refreshed, it will not allow the operation in the second &lt;b&gt;postDecisionPersisted&lt;/b&gt; to go through&lt;/li&gt;
&lt;/ol&gt;
</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|i035rj:</customfieldvalue>

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