<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:16:41 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-27941] Remove the shardVersion check when entering the critical section.</title>
                <link>https://jira.mongodb.org/browse/SERVER-27941</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We check &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/migration_source_manager.cpp#L238-L249&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; that the shardVersion we began the migration with is still the shardVersion. This seems like an unnecessary check now, since shards no longer hold distributed locks.&lt;/p&gt;

&lt;p&gt;We&apos;re running into a race condition when a shard is the recipient of a chunk and then the donor of a chunk in quick succession. This is the scenario:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;There a migration from shard Y to shard X.&lt;/li&gt;
	&lt;li&gt;We release destination shard X before the donor shard Y commits the migration to the config server.&lt;/li&gt;
	&lt;li&gt;Shard X starts acting as a donor shard in a new migration, still before shard Y commits the previous migration.&lt;/li&gt;
	&lt;li&gt;Donor shard X reloads the chunk metadata at the start of the new migration, setting the MigrationSourceManager::_collectionMetadata with that newly loaded chunk metadata.&lt;/li&gt;
	&lt;li&gt;Shard Y finally finishes the commit.&lt;/li&gt;
	&lt;li&gt;Shard X attempts to enter the critical section, checks MigrationSourceManager::_collectionMetadata&apos;s shardVersion still matches the shard&apos;s current chunk metadata, sees that they&apos;re different and fails.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="352447">SERVER-27941</key>
            <summary>Remove the shardVersion check when entering the critical section.</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="9">Done</resolution>
                                        <assignee username="dianna.hohensee@mongodb.com">Dianna Hohensee</assignee>
                                    <reporter username="dianna.hohensee@mongodb.com">Dianna Hohensee</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 Feb 2017 22:43:18 +0000</created>
                <updated>Wed, 30 May 2018 13:29:43 +0000</updated>
                            <resolved>Fri, 24 Feb 2017 22:44:31 +0000</resolved>
                                                    <fixVersion>3.4.15</fixVersion>
                    <fixVersion>3.5.4</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1864204" author="xgen-internal-githook" created="Fri, 13 Apr 2018 20:54:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;dianna.hohensee@10gen.com&apos;, &apos;name&apos;: &apos;Dianna Hohensee&apos;, &apos;username&apos;: &apos;DiannaHohensee&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27941&quot; title=&quot;Remove the shardVersion check when entering the critical section.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27941&quot;&gt;&lt;del&gt;SERVER-27941&lt;/del&gt;&lt;/a&gt; change the shardVersion check to an epoch check when entering the critical section.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit ce23378926659bc50604032782485c2f962c37ac)&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f0299d35a0e91246fa95005c78319bcabd43494d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f0299d35a0e91246fa95005c78319bcabd43494d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1836969" author="misha.tyulenev" created="Fri, 16 Mar 2018 18:03:46 +0000"  >&lt;p&gt;To resolve BF-5136&lt;/p&gt;</comment>
                            <comment id="1509349" author="xgen-internal-githook" created="Fri, 24 Feb 2017 22:43:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;DiannaHohensee&apos;, u&apos;name&apos;: u&apos;Dianna Hohensee&apos;, u&apos;email&apos;: u&apos;dianna.hohensee@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27941&quot; title=&quot;Remove the shardVersion check when entering the critical section.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27941&quot;&gt;&lt;del&gt;SERVER-27941&lt;/del&gt;&lt;/a&gt; change the shardVersion check to an epoch check when entering the critical section.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ce23378926659bc50604032782485c2f962c37ac&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ce23378926659bc50604032782485c2f962c37ac&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1496438" author="schwerin" created="Thu, 9 Feb 2017 21:52:29 +0000"  >&lt;p&gt;Thanks. That context is useful.&lt;/p&gt;</comment>
                            <comment id="1495901" author="dianna.hohensee" created="Thu, 9 Feb 2017 14:54:55 +0000"  >&lt;p&gt;It&apos;s unclear what the original intent was. It goes back to &lt;a href=&quot;https://github.com/mongodb/mongo/commit/6bd7d29d9985c861c35bf4759c86e67f5505a28c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this commit (in d_migrate.cpp, &quot;assert( myVersion &amp;gt; shardingState.getVersion( ns ) );&quot;)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My guess is that it was a check to see if the distributed lock had been overtaken since the migration began, and then whether another migration had happened somewhere else by checking the latest collection version. Since we used to have shards create and commit the new chunk versions, being the only ongoing migration was essential for success.&lt;/p&gt;

&lt;p&gt;Now it doesn&apos;t matter whether the collection version changes. We allow parallel migrations, and the config server serializes the creation and commit of new chunk versions. This check can actually cause parallel running migrations to be aborted unnecessarily, if the chunk metadata has cause to refresh between the migration start and entering the critical section, and another migration elsewhere has committed a new chunk (and thus collectionVersion gets bumped up).&lt;/p&gt;</comment>
                            <comment id="1495530" author="schwerin" created="Wed, 8 Feb 2017 22:51:14 +0000"  >&lt;p&gt;I could use an explanation for why this check used to be necessary and why it&apos;s definitely not necessary anymore.&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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="14340"><![CDATA[v3.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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000atZPzIAM]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 8 Feb 2017 22:51:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 43 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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 43 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>0.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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>misha.tyulenev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht24zz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsuqrb:</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="1455">Sharding 2017-03-06</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|hs4h3r:</customfieldvalue>

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