<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:20:16 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-49568] Implement detection system for noticing a change to resharding state in config.collections on shards</title>
                <link>https://jira.mongodb.org/browse/SERVER-49568</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We are under the constraint that we can&apos;t take locks, and accordingly can&apos;t do writes, during the catalog cache refresh.&lt;/p&gt;

&lt;p&gt;This ticket is to figure out a way to either temporarily capture the config.collections data, or signal that we need to re-do a find later, then finally take action at &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ee7c632b25d56f2d7c47edeeb3a81ef206f61924/src/mongo/db/s/shard_filtering_metadata_refresh.cpp#L119&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this location&lt;/a&gt; in the shard version recovery process. &lt;/p&gt;

&lt;p&gt;There are multiple ways this can be designed &amp;#8211; whoever does this ticket can create something more generic, a way to signal actions that should be taken after a refresh, or it can be in-line logic that leads to a resharding util helper function that can process the state information.&lt;/p&gt;

&lt;p&gt;No matter how this is designed, we must assert that the state and metadata changes are locally written before we exit the linked location. That is, on exit of &lt;tt&gt;recoverRefreshShardVersion&lt;/tt&gt;, we should have always written any necessary state changes to &lt;tt&gt;config.localReshardingOperations&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;We may have to make any async tasks happen in an onCommit handler. From Max in Slack:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;the async task might need to be started in an onCommit() handler on the recovery unit then because it is possible for the storage transaction to abort (WUOW rollback not replication rollback)&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="1412485">SERVER-49568</key>
            <summary>Implement detection system for noticing a change to resharding state in config.collections on shards</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="blake.oler@mongodb.com">Blake Oler</reporter>
                        <labels>
                            <label>PM-234-M1</label>
                            <label>PM-234-T-lifecycle</label>
                    </labels>
                <created>Thu, 16 Jul 2020 18:23:55 +0000</created>
                <updated>Sun, 29 Oct 2023 22:05:43 +0000</updated>
                            <resolved>Wed, 2 Sep 2020 13:19:18 +0000</resolved>
                                                    <fixVersion>4.7.0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3371666" author="xgen-internal-githook" created="Wed, 2 Sep 2020 06:33:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Blake Oler&apos;, &apos;email&apos;: &apos;blake.oler@mongodb.com&apos;, &apos;username&apos;: &apos;BlakeIsBlake&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-49568&quot; title=&quot;Implement detection system for noticing a change to resharding state in config.collections on shards&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-49568&quot;&gt;&lt;del&gt;SERVER-49568&lt;/del&gt;&lt;/a&gt; Thread the CollectionType&apos;s ReshardingFields through to the CatalogCache refresh&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/52f77e8edb3e422d3329915933c0633a3c09786e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/52f77e8edb3e422d3329915933c0633a3c09786e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3323324" author="blake.oler" created="Wed, 5 Aug 2020 18:54:02 +0000"  >&lt;p&gt;Randolph gave his LGTM over Slack.&lt;/p&gt;</comment>
                            <comment id="3322779" author="blake.oler" created="Wed, 5 Aug 2020 14:53:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt; &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; to approve this approach.&lt;/p&gt;</comment>
                            <comment id="3322775" author="blake.oler" created="Wed, 5 Aug 2020 14:53:00 +0000"  >&lt;p&gt;Proposed implementation:&lt;/p&gt;

&lt;p&gt;Member data changes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Add &lt;tt&gt;TypeCollectionReshardingFields&lt;/tt&gt; as a boost::optional to &lt;tt&gt;CollectionAndChangedChunks&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Add &lt;tt&gt;TypeCollectionReshardingFields&lt;/tt&gt; as a boost::optional inside &lt;tt&gt;RoutingTableHistory&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Process changes: &lt;/p&gt;

&lt;p&gt;&lt;em&gt;When doing a catalog cache refresh...&lt;/em&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;When we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7408f50908d307567e1c4f4b3844e55ad6bd8e01/src/mongo/s/config_server_catalog_cache_loader.cpp#L85&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;retrieve the config.collections entry from the config server&lt;/a&gt;, pass the resharding fields into the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7408f50908d307567e1c4f4b3844e55ad6bd8e01/src/mongo/s/config_server_catalog_cache_loader.cpp#L112-L117&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CollAndChangedChunks struct&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;Pass resharding fields into the RoutingTableHistory object when &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7408f50908d307567e1c4f4b3844e55ad6bd8e01/src/mongo/s/catalog_cache.cpp#L102-L126&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;constructing a new RoutingTableHistory&lt;/a&gt; as part of refresh.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;&lt;em&gt;When updating as part of forceShardFilteringMetadataRefresh&lt;/em&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Retrieve the current RoutingTableHistory from the CollectionShardingState after we force refresh &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7408f50908d307567e1c4f4b3844e55ad6bd8e01/src/mongo/db/s/shard_filtering_metadata_refresh.cpp#L120&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;, after which we will have the resharding fields to act upon. This is the same place that Marcos acts upon shard version changing to &lt;a href=&quot;https://mongodbcr.appspot.com/632280001/diff/655820010/src/mongo/db/s/shard_filtering_metadata_refresh.cpp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;indicate a collection should be created (line 158)&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

</comment>
                            <comment id="3294766" author="kaloian.manassiev" created="Tue, 21 Jul 2020 16:14:53 +0000"  >&lt;p&gt;Per in-person discussion with &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;, there should not be any need for this work, because we actually can take locks as part of shardVersion recovery and/or advancement.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.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>Tue, 21 Jul 2020 16:14:53 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 23 weeks 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>
                            3 years, 23 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>blake.oler@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</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|hxvcf3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxdfg7:</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="4251">Sharding 2020-09-07</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|hxuyof:</customfieldvalue>

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