<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:37:46 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-34760] Retries of _configsvrShardCollection may not send setShardVersion to primary shard</title>
                <link>https://jira.mongodb.org/browse/SERVER-34760</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;tt&gt;_configsvrShardCollection&lt;/tt&gt;&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/873b3feaae29803d17baf3ba07652c38e36543ac/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp#L557-L558&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;majority updates the &lt;tt&gt;config.collections&lt;/tt&gt; collection&lt;/a&gt; to mark a collection as sharded then &lt;a href=&quot;https://github.com/mongodb/mongo/blob/873b3feaae29803d17baf3ba07652c38e36543ac/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp#L567-L573&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sends &lt;tt&gt;setShardVersion&lt;/tt&gt;&#160;to the primary shard&lt;/a&gt; for the collection&apos;s database so it knows to refresh. If the write is interrupted by a retryable error (like a stepdown), the command can fail, but the update may still have been locally committed and/or partially replicated to the new primary. Then when the command is retried by mongos, the config server &lt;a href=&quot;https://github.com/mongodb/mongo/blob/873b3feaae29803d17baf3ba07652c38e36543ac/src/mongo/db/s/config/configsvr_shard_collection_command.cpp#L819-L825&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;can see the write has been locally committed and return early&lt;/a&gt;, skipping the setShardVersion call, allowing the command to complete successfully without the primary shard knowing the collection has been sharded.&lt;/p&gt;</description>
                <environment></environment>
        <key id="536743">SERVER-34760</key>
            <summary>Retries of _configsvrShardCollection may not send setShardVersion to primary shard</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="blake.oler@mongodb.com">Blake Oler</assignee>
                                    <reporter username="jack.mulrow@mongodb.com">Jack Mulrow</reporter>
                        <labels>
                    </labels>
                <created>Mon, 30 Apr 2018 21:38:05 +0000</created>
                <updated>Sun, 29 Oct 2023 22:32:13 +0000</updated>
                            <resolved>Fri, 13 Sep 2019 17:27:50 +0000</resolved>
                                                    <fixVersion>3.6.15</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2419844" author="blake.oler" created="Fri, 13 Sep 2019 17:22:01 +0000"  >&lt;p&gt;After talking 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;, we&apos;ve decided that the build failure load related to dropCollection on 3.6 isn&apos;t significant enough to backport &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33973&quot; title=&quot;Force cleanup of possibly remaining partial data (from failed collection/database drop) when rerunning dropCollection command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33973&quot;&gt;&lt;del&gt;SERVER-33973&lt;/del&gt;&lt;/a&gt; or do further work under this ticket. We&apos;re closing this with only the shardCollection work.&lt;/p&gt;</comment>
                            <comment id="2418851" author="xgen-internal-githook" created="Thu, 12 Sep 2019 22:32:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Blake Oler&apos;, &apos;username&apos;: &apos;BlakeIsBlake&apos;, &apos;email&apos;: &apos;blake.oler@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34760&quot; title=&quot;Retries of _configsvrShardCollection may not send setShardVersion to primary shard&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34760&quot;&gt;&lt;del&gt;SERVER-34760&lt;/del&gt;&lt;/a&gt; Send setShardVersion on retries of shardCollection&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/06d398fb3a9ade0bfd9e4a580015cc4f491089ce&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/06d398fb3a9ade0bfd9e4a580015cc4f491089ce&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2379066" author="blake.oler" created="Tue, 20 Aug 2019 15:15:55 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alyson.cabral&quot; class=&quot;user-hover&quot; rel=&quot;alyson.cabral&quot;&gt;alyson.cabral&lt;/a&gt; this will just imply that the shard will not know that the collection is sharded after a successful return. AFAIK the shard will know once it receives a versioned command. &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&lt;/a&gt; That is correct, this issue only exists on 3.6 and earlier due to the config server driving the shardCollection command. We will only be increasing the time on retries in versions 3.6 and earlier.&lt;/p&gt;</comment>
                            <comment id="2369957" author="kaloian.manassiev" created="Wed, 14 Aug 2019 07:33:42 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=blake.oler&quot; class=&quot;user-hover&quot; rel=&quot;blake.oler&quot;&gt;blake.oler&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Would we be open to increasing time for shardCollection as well, by always sending setShardVersion?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;During the normal execution of the command we always send SetShardVersion to the primary shard, so the only situation where the time would be increased is if there was a failure and a retry, right? If this is the case then I don&apos;t see a problem with doing it, however is this still the case with the move of the shard collection main logic to the primary shard? Because the primary shard effectively does exactly what SSV does (syncing from the config server). Is this only for 3.6 and earlier?&lt;/p&gt;</comment>
                            <comment id="2365829" author="alyson.cabral" created="Sat, 10 Aug 2019 23:48:17 +0000"  >&lt;p&gt;Is the result of this behavior today, that we can send a success on the shard collection command but the collection isn&apos;t actually sharded? Is there any other weird behavior?&lt;/p&gt;</comment>
                            <comment id="2287302" author="blake.oler" created="Mon, 17 Jun 2019 16:14:40 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alyson.cabral&quot; class=&quot;user-hover&quot; rel=&quot;alyson.cabral&quot;&gt;alyson.cabral&lt;/a&gt;, it seems that we have solved this issue for dropCollection with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33973&quot; title=&quot;Force cleanup of possibly remaining partial data (from failed collection/database drop) when rerunning dropCollection command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33973&quot;&gt;&lt;del&gt;SERVER-33973&lt;/del&gt;&lt;/a&gt;. Would we be open to increasing time for shardCollection as well, by always sending setShardVersion?&lt;/p&gt;</comment>
                            <comment id="1974047" author="jack.mulrow" created="Mon, 13 Aug 2018 15:00:27 +0000"  >&lt;p&gt;The most frequent BFs linked to this ticket are from the continuous config stepdown suite, and because most of the logic for shardCollection was moved to the primary shard by&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35722&quot; title=&quot;Create internal _shardsvrShardCollection command that runs on the primary shard&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35722&quot;&gt;&lt;del&gt;SERVER-35722&lt;/del&gt;&lt;/a&gt;, those failures should have gone away. The bug for shardCollection does still exist if the primary shard steps down at the wrong time, but we don&apos;t have as much test coverage of that so we won&apos;t see as many test failures.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&lt;/a&gt;, should this ticket still be a priority now that &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35722&quot; title=&quot;Create internal _shardsvrShardCollection command that runs on the primary shard&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35722&quot;&gt;&lt;del&gt;SERVER-35722&lt;/del&gt;&lt;/a&gt; has been finished? That ticket has a 4.0 backport request, but the BFs linked to this ticket also happen on 3.6, so should we consider doing something only on the 3.6 branch instead?&lt;/p&gt;</comment>
                            <comment id="1889189" author="kaloian.manassiev" created="Fri, 11 May 2018 15:07:39 +0000"  >&lt;blockquote&gt;&lt;p&gt;We&apos;d have to blacklist every test that calls shardCollection or dropCollection and expects the shard to have become aware.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That&apos;s why I filed &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32558&quot; title=&quot;Consider removing the sharding continuous stepdown suite&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32558&quot;&gt;&lt;del&gt;SERVER-32558&lt;/del&gt;&lt;/a&gt;. At this point the config server stepdown suite has become a nuisance. Our metadata operations have known deficiencies where they are not idempotent and we know of cases where manual intervention is necessary for cleanup and yet we continue to test these operations&apos; idempotency.&lt;/p&gt;</comment>
                            <comment id="1889185" author="esha.maharishi@10gen.com" created="Fri, 11 May 2018 15:04:51 +0000"  >&lt;p&gt;We&apos;d have to blacklist every test that calls shardCollection or dropCollection and expects the shard to have become aware... this seems like a lot :/&lt;/p&gt;

&lt;p&gt;Another option is to override shardCollection and dropCollection in the shell to send _flushRoutingTableCacheUpdates directly to the shard afterwards, which simulates that the setShardVersion was sent.&lt;/p&gt;</comment>
                            <comment id="1889165" author="kaloian.manassiev" created="Fri, 11 May 2018 14:56:20 +0000"  >&lt;p&gt;This looks like a general non-retryability problem, just like &lt;tt&gt;_configsvrMovePrimary&lt;/tt&gt;. I think we should just blacklist these tests.&lt;/p&gt;</comment>
                            <comment id="1878526" author="esha.maharishi@10gen.com" created="Mon, 30 Apr 2018 21:45:59 +0000"  >&lt;p&gt;This is also true for _configsvrDropCollection.&lt;/p&gt;

&lt;p&gt;I don&apos;t know if the correct way to address it is to make these two commands send setShardVersion on retries.&lt;/p&gt;

&lt;p&gt;It will certainly reduce the likelihood that the setShardVersion is not sent, but the distributed catalog can still end up in a stale where the collection entry exists on the config server, but setShardVersion was never sent to the shard (e.g., mongos exhausts its retries in the face of repeated config stepdowns).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <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="534811">SERVER-34708</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10423">
                    <name>Gantt End to End</name>
                                            <outwardlinks description="has to be finished together with">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11.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_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, 30 Apr 2018 21:45:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 21 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 21 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>31.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>alyson.cabral@mongodb.com</customfieldvalue>
            <customfieldvalue>blake.oler@mongodb.com</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htwui7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htvt7z:</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="2451">Sharding 2018-08-13</customfieldvalue>
    <customfieldvalue id="3062">Sharding 2019-07-29</customfieldvalue>
    <customfieldvalue id="3164">Sharding 2019-08-12</customfieldvalue>
    <customfieldvalue id="3197">Sharding 2019-08-26</customfieldvalue>
    <customfieldvalue id="3198">Sharding 2019-09-09</customfieldvalue>
    <customfieldvalue id="3199">Sharding 2019-09-23</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|htwgr3:</customfieldvalue>

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