<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:36:43 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-77831] [test-only bug] CheckRoutingTableConsistency may be executing while sessions collection is being sharded</title>
                <link>https://jira.mongodb.org/browse/SERVER-77831</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The &lt;tt&gt;CheckRoutingTableConsistency&lt;/tt&gt; hook can sporadically fail when it is executed exactly while the sessions collection &lt;a href=&quot;https://github.com/mongodb/mongo/blob/49e3940379fd390789f7917dede2248e5caf2780/src/mongo/db/s/sessions_collection_config_server.cpp#L48-L71&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;is being sharded&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://github.com/mongodb/mongo/blob/49e3940379fd390789f7917dede2248e5caf2780/src/mongo/db/session/logical_session_cache.idl#L34-L40&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;logicalSessionRefreshMillis&lt;/a&gt; parameter (defaulted to 5 minutes) is driving the logical session cache refresh that - when no sessions have been used during testing - basically spawns the creation+sharding of the sessions collection. &lt;/p&gt;

&lt;p&gt;Since the refresh is asynchronous, it can totally happen for it to overlap with the execution of teardown hooks.&lt;/p&gt;

&lt;p&gt;The failing flow is the following, happening more or less 5 minutes after the sharded cluster has been spawned for testing:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;logical session refresh&amp;#93;&lt;/span&gt; Create chunk entry for the sessions collection (insert in &lt;tt&gt;config.chunks&lt;/tt&gt;)&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;test&amp;#93;&lt;/span&gt; CheckRoutingTableConsistency lurks in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/49e3940379fd390789f7917dede2248e5caf2780/jstests/libs/check_routing_table_consistency_helpers.js#L219-L220&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;looking for inconsistencies&lt;/a&gt; (make sure there is no document in &lt;tt&gt;config.chunks&lt;/tt&gt; referring a collection UUID that is not present in &lt;tt&gt;config.collections&lt;/tt&gt;)&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;logical session refresh&amp;#93;&lt;/span&gt; Create collection entry for the sessions collection (insert in &lt;tt&gt;config.collections&lt;/tt&gt;)&lt;/li&gt;
&lt;/ol&gt;

</description>
                <environment></environment>
        <key id="2359595">SERVER-77831</key>
            <summary>[test-only bug] CheckRoutingTableConsistency may be executing while sessions collection is being sharded</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="pierlauro.sciarelli@mongodb.com">Pierlauro Sciarelli</assignee>
                                    <reporter username="pierlauro.sciarelli@mongodb.com">Pierlauro Sciarelli</reporter>
                        <labels>
                            <label>car-71-backport-declined</label>
                            <label>shardingemea-qw</label>
                    </labels>
                <created>Tue, 6 Jun 2023 14:09:24 +0000</created>
                <updated>Sun, 29 Oct 2023 21:20:26 +0000</updated>
                            <resolved>Fri, 1 Sep 2023 07:43:02 +0000</resolved>
                                                    <fixVersion>7.2.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5673957" author="pierlauro.sciarelli" created="Fri, 1 Sep 2023 07:43:03 +0000"  >&lt;p&gt;Closing as &quot;Gone away&quot; because &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-79157&quot; title=&quot;Change create collection coordinator to allow sharding unsplittable collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-79157&quot;&gt;&lt;del&gt;SERVER-79157&lt;/del&gt;&lt;/a&gt; moved the collection/chunks documents insertion within the same transaction.&lt;/p&gt;</comment>
                            <comment id="5668807" author="pierlauro.sciarelli" created="Wed, 30 Aug 2023 14:34:09 +0000"  >&lt;p&gt;There is no compelling reason for &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a8c81124cec10d0c33c42c6cfad8ce525e9f3402/src/mongo/db/s/create_collection_coordinator.cpp#L371-L388&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;insertChunks&lt;/a&gt; not to happen in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a8c81124cec10d0c33c42c6cfad8ce525e9f3402/src/mongo/db/s/create_collection_coordinator.cpp#L413C6-L413C41&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the transaction&lt;/a&gt; inserting collection and placement history entries.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-79157&quot; title=&quot;Change create collection coordinator to allow sharding unsplittable collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-79157&quot;&gt;&lt;del&gt;SERVER-79157&lt;/del&gt;&lt;/a&gt; is currently ongoing and should move chunks creation within the transaction, that would solve the root cause of this bug. Marking this as blocked on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-79157&quot; title=&quot;Change create collection coordinator to allow sharding unsplittable collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-79157&quot;&gt;&lt;del&gt;SERVER-79157&lt;/del&gt;&lt;/a&gt; to double-check that it can be safely closed after that ticket is committed.&lt;/p&gt;</comment>
                            <comment id="5478059" author="pierlauro.sciarelli" created="Tue, 6 Jun 2023 14:28:59 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Is a similar spurious failure not possible for other collections as they are in the midst of being sharded?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Correct, this is not possible for other collections because &lt;tt&gt;config.system.sessions&lt;/tt&gt; is the only one that can be sharded &quot;by the system&quot; without a client requesting it. That&apos;s why it can run during teardown (after the test finished but before shutting down).&lt;/p&gt;

&lt;p&gt;I believe a possible solution could be to transactionally insert collection and chunks entries. We may even consider doing it for all collections considering we never have to shard with &quot;too many&quot; chunks after &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-74747&quot; title=&quot;Deprecate `numInitialChunks` parameter of `shardCollection` command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-74747&quot;&gt;&lt;del&gt;SERVER-74747&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="5478042" author="max.hirschhorn@10gen.com" created="Tue, 6 Jun 2023 14:20:54 +0000"  >&lt;p&gt;Is a similar spurious failure not possible for other collections as they are in the midst of being sharded? If so, then what is making the config.system.sessions collection special in how it becomes sharded?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="2397158">SERVER-79157</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <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>4.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25133"><![CDATA[Sharding EMEA]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_23577" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>CAR Impact</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25718"><![CDATA[5 BF w/evergreen redness]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 6 Jun 2023 14:20:54 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        22 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-79157'>SERVER-79157</a></s>]]></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>
                            22 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>5.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>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>pierlauro.sciarelli@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2ce2v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1um6o:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7189">Sharding EMEA 2023-06-26</customfieldvalue>
    <customfieldvalue id="7190">Sharding EMEA 2023-07-10</customfieldvalue>
    <customfieldvalue id="7193">Sharding EMEA 2023-08-21</customfieldvalue>
    <customfieldvalue id="7194">Sharding EMEA 2023-09-04</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2c087:</customfieldvalue>

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