<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:26: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-74197] StaleConfig exceptions should not escape from the RouterRole loop</title>
                <link>https://jira.mongodb.org/browse/SERVER-74197</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The current &lt;tt&gt;StaleConfig&lt;/tt&gt; exceptions are a form of &lt;tt&gt;WriteConflictException&lt;/tt&gt; which are a way for the ShardRole to indicate to the upstream RouterRole that it didn&apos;t route to the correct shard. By this definition, they should never escape the &lt;tt&gt;RouterRole&lt;/tt&gt; loop, because there could be an upstream &lt;tt&gt;RouterRole&lt;/tt&gt; loop which can incorrectly misinterpret the exception to mean it routed to the wrong place for one collection, while in fact the upstream router didn&apos;t even route to a ShardRole.&lt;/p&gt;

&lt;p&gt;An example of this would be a recursive tree of &lt;tt&gt;$lookup&lt;/tt&gt;s operating on views.&lt;/p&gt;

&lt;p&gt;In order to catch such exceptions wrongly propagated up the tree, the existing router role loop(s) have invariants &lt;a href=&quot;https://github.com/mongodb/mongo/blob/62c3f0c89a530631f479ab19b1ac32f7c53e21dc/src/mongo/s/router.cpp#L147&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/62c3f0c89a530631f479ab19b1ac32f7c53e21dc/src/mongo/s/stale_shard_version_helpers.cpp#L83&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. Without this invariant, it is possible that the client of the router role loop (i.e., the lambda inside) makes a mistake and uses the routing info provided for namespace 1, but attaches it to namespace 2.&lt;/p&gt;

&lt;p&gt;Currently, it is possible that a certain combination of {{$lookup}}s operating on views triggers this invariant.&lt;/p&gt;

&lt;p&gt;This ticket is to introduce a different kind of &lt;tt&gt;StaleConfig&lt;/tt&gt; exception which just indicates to the upstream router that it can retry and there is no action to be taken, such as refreshing.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2269799">SERVER-74197</key>
            <summary>StaleConfig exceptions should not escape from the RouterRole loop</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="13203">Gone away</resolution>
                                        <assignee username="jordi.olivares-provencio@mongodb.com">Jordi Olivares Provencio</assignee>
                                    <reporter username="kaloian.manassiev@mongodb.com">Kaloian Manassiev</reporter>
                        <labels>
                            <label>oldshardingemea</label>
                    </labels>
                <created>Mon, 20 Feb 2023 18:05:18 +0000</created>
                <updated>Tue, 16 Jan 2024 14:49:12 +0000</updated>
                            <resolved>Tue, 16 Jan 2024 14:49:11 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="6013875" author="JIRAUSER1264163" created="Tue, 16 Jan 2024 14:49:12 +0000"  >&lt;p&gt;Closing this as Gone Away since the issue doesn&apos;t exist on master anymore and could be at most a theoretical liveness issue that would fail after 10 attempts of an operation that is already failing anyway.&lt;/p&gt;

&lt;p&gt;Currently the only way we could hit this &lt;tt&gt;tassert&lt;/tt&gt; in a multi-document transaction is by calling the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8f99fe2e65e9155161864634cd591ab5e0d80c1a/src/mongo/s/stale_shard_version_helpers.h#L92&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;shardVersionRetry&lt;/tt&gt;&lt;/a&gt; helper functions. These functions are mostly used internally by DDL commands and so cannot be used by a multi-document transaction. The only place I can imagine that is accessible by the user is the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8f99fe2e65e9155161864634cd591ab5e0d80c1a/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp#L206&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;MongosProcessInterface::lookupSingleDocument&lt;/tt&gt;&lt;/a&gt; method which is only used internally for change stream manipulation and resharding. These two methods cannot be used in multi-document transactions as well.&lt;/p&gt;</comment>
                            <comment id="5965815" author="JIRAUSER1264163" created="Thu, 21 Dec 2023 14:18:31 +0000"  >&lt;p&gt;After a discussion with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev@mongodb.com&quot;&gt;kaloian.manassiev@mongodb.com&lt;/a&gt; we discovered this was an issue at the time of writing for views in particular. However, this has been fixed by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81233&quot; title=&quot;Prevent kickback to router when reading from views on unsplittable collections located on the db-primary&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81233&quot;&gt;&lt;del&gt;SERVER-81233&lt;/del&gt;&lt;/a&gt; on master.&lt;/p&gt;

&lt;p&gt;It could still a problem for the following situations:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;We are in a distributed transaction and some downstream router can&apos;t retry.&lt;/li&gt;
	&lt;li&gt;Some downstream router exhausted the 10 retry attempts (this is extremely rare and could be due to migrations happening too quickly)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Multi-document transactions would fall under the first case since the routers would pass upstream the failure as it can&apos;t be retried. The upstream router would get confused since the exception would be for a different namespace altogether.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2275035">SERVER-74380</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26387"><![CDATA[Catalog and Routing]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 21 Dec 2023 14:18:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 weeks, 1 day 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-3229</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>jordi.olivares-provencio@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>107.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>jordi.olivares-provencio@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|i1wwnz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1fbww:</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="7891">CAR Team 2023-12-25</customfieldvalue>
    <customfieldvalue id="7892">CAR Team 2024-01-08</customfieldvalue>
    <customfieldvalue id="8006">CAR Team 2024-01-22</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|i1witb:</customfieldvalue>

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