<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:13:20 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-69389] Command checkAuthorization may throw ErrorCodes::NamespaceNotFound for existing collection while trying to resolve UUID to namespace when the node is  shutting down. </title>
                <link>https://jira.mongodb.org/browse/SERVER-69389</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Nodes can throw &lt;a href=&quot;https://github.com/10gen/mongo/blob/6ffbe0d149bf9419b227a0fa80928437c92ed8c5/src/mongo/db/catalog/collection_catalog.cpp#L1062&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;ErrorCodes::NamespaceNotFound&lt;/tt&gt;&lt;/a&gt;&#160;for existing collections while trying to resolve UUID to namespace when the node is shutting down and has finished deregistering all the collections and clearing the&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/6ffbe0d149bf9419b227a0fa80928437c92ed8c5/src/mongo/db/catalog/collection_catalog.cpp#L1339&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CollectionCatalog::_catlog map&lt;/a&gt; from the in-memory collection catalog. There are few commands, like,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/6ffbe0d149bf9419b227a0fa80928437c92ed8c5/src/mongo/db/commands/count_cmd.cpp#L143&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;count&lt;/a&gt;, tries to resolve UUID to namespace as part of the authorization check without holding any locks. &lt;tt&gt;ErrorCodes::NamespaceNotFound&lt;/tt&gt; makes the multi-tenant migration protocol to &lt;a href=&quot;https://github.com/10gen/mongo/blob/6ffbe0d149bf9419b227a0fa80928437c92ed8c5/src/mongo/db/repl/tenant_collection_cloner.cpp#L146&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;skip cloning the collection&lt;/a&gt; from donor to recipient as the recipient assumes that the collection was dropped on the donor. And, the tenant migration may still go ahead and commit without copying all collections of the tenant from donor to recipient and leading to data corruption.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Note: This a problem with logical &lt;a href=&quot;https://github.com/10gen/mongo/blob/bd8a8d4d880577302c777ff961f359b03435126a/src/mongo/db/repl/collection_cloner.cpp#L160&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;initial sync&lt;/a&gt; as well.&lt;/b&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2128056">SERVER-69389</key>
            <summary>Command checkAuthorization may throw ErrorCodes::NamespaceNotFound for existing collection while trying to resolve UUID to namespace when the node is  shutting down. </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="gregory.noma@mongodb.com">Gregory Noma</assignee>
                                    <reporter username="suganthi.mani@mongodb.com">Suganthi Mani</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Sep 2022 22:29:36 +0000</created>
                <updated>Sun, 29 Oct 2023 21:33:40 +0000</updated>
                            <resolved>Thu, 15 Sep 2022 20:01:52 +0000</resolved>
                                                    <fixVersion>4.4.18</fixVersion>
                    <fixVersion>5.0.14</fixVersion>
                    <fixVersion>6.0.3</fixVersion>
                    <fixVersion>6.1.0-rc4</fixVersion>
                    <fixVersion>6.2.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="4907840" author="xgen-internal-githook" created="Mon, 17 Oct 2022 18:03:16 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69389&quot; title=&quot;Command checkAuthorization may throw ErrorCodes::NamespaceNotFound for existing collection while trying to resolve UUID to namespace when the node is  shutting down. &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69389&quot;&gt;&lt;del&gt;SERVER-69389&lt;/del&gt;&lt;/a&gt; Populate shadow collection catalog on clean shutdown&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 5457b4527960627071d26310111b29510105d42f)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1ff0f181d863dc3c27c8c4ae1bc9a6b174f09a15&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1ff0f181d863dc3c27c8c4ae1bc9a6b174f09a15&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4876267" author="xgen-internal-githook" created="Tue, 4 Oct 2022 13:52:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69389&quot; title=&quot;Command checkAuthorization may throw ErrorCodes::NamespaceNotFound for existing collection while trying to resolve UUID to namespace when the node is  shutting down. &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69389&quot;&gt;&lt;del&gt;SERVER-69389&lt;/del&gt;&lt;/a&gt; Populate shadow collection catalog on clean shutdown&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 5457b4527960627071d26310111b29510105d42f)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8839b9fe60369c98f70349796b46b89e9b56580c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8839b9fe60369c98f70349796b46b89e9b56580c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4876195" author="xgen-internal-githook" created="Tue, 4 Oct 2022 13:35:11 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69389&quot; title=&quot;Command checkAuthorization may throw ErrorCodes::NamespaceNotFound for existing collection while trying to resolve UUID to namespace when the node is  shutting down. &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69389&quot;&gt;&lt;del&gt;SERVER-69389&lt;/del&gt;&lt;/a&gt; Populate shadow collection catalog on clean shutdown&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 5457b4527960627071d26310111b29510105d42f)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/264aff7f5aa9f5c4d73b8c7cda66d4fb93be3711&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/264aff7f5aa9f5c4d73b8c7cda66d4fb93be3711&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4874393" author="xgen-internal-githook" created="Mon, 3 Oct 2022 20:11:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69389&quot; title=&quot;Command checkAuthorization may throw ErrorCodes::NamespaceNotFound for existing collection while trying to resolve UUID to namespace when the node is  shutting down. &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69389&quot;&gt;&lt;del&gt;SERVER-69389&lt;/del&gt;&lt;/a&gt; Populate shadow collection catalog on clean shutdown&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 5457b4527960627071d26310111b29510105d42f)&lt;br/&gt;
Branch: v6.1&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b6e0525d6de06526fb5f1e99fb842ad144fff02a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b6e0525d6de06526fb5f1e99fb842ad144fff02a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4831423" author="xgen-internal-githook" created="Thu, 15 Sep 2022 18:40:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69389&quot; title=&quot;Command checkAuthorization may throw ErrorCodes::NamespaceNotFound for existing collection while trying to resolve UUID to namespace when the node is  shutting down. &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69389&quot;&gt;&lt;del&gt;SERVER-69389&lt;/del&gt;&lt;/a&gt; Populate shadow collection catalog on clean shutdown&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/5457b4527960627071d26310111b29510105d42f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/5457b4527960627071d26310111b29510105d42f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4802134" author="suganthi.mani" created="Mon, 5 Sep 2022 10:19:21 +0000"  >&lt;p&gt;We had a similar problem before where a user thread trying to resolve UUID to namespace races with rollback thread trying to close the catalog. We fixed the problem by introducing shadow catalog to allow such name resolution (see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33632&quot; title=&quot;Make UUID catalog reload atomic&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33632&quot;&gt;&lt;del&gt;SERVER-33632&lt;/del&gt;&lt;/a&gt;). I am proposing a similar fix to solve this problem - Introduce a new boolean variable &lt;tt&gt;CollectionCatalog::_isShuttingDown&lt;/tt&gt; which will be marked to true on &lt;a href=&quot;https://github.com/10gen/mongo/blob/6ffbe0d149bf9419b227a0fa80928437c92ed8c5/src/mongo/db/catalog/collection_catalog.cpp#L1339&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;deregistering collections&lt;/a&gt; due to shutdown. And, &lt;a href=&quot;https://github.com/10gen/mongo/blob/bd8a8d4d880577302c777ff961f359b03435126a/src/mongo/db/storage/storage_engine_impl.cpp#L792&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CollectionCatalog::lookupNSSByUUID()&lt;/a&gt; should throw &#8220;ErrorCodes::ShutdownInProgress&#8221; if &lt;tt&gt;CollectionCatalog::_isShuttingDown&lt;/tt&gt; is true . Since catalog updates are copy-on-write, it ensures that clearing the _catlog map and setting &lt;tt&gt;_isShuttingDown&lt;/tt&gt; true are done atomically.&lt;/p&gt;


&lt;p&gt;CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.maharishi%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;esha.maharishi@mongodb.com&quot;&gt;esha.maharishi@mongodb.com&lt;/a&gt; for Serverless visibility &amp;amp; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matthew.russotto%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;matthew.russotto@mongodb.com&quot;&gt;matthew.russotto@mongodb.com&lt;/a&gt; for replication visibility as I believe logical initial sync has this same problem.&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>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="504888">SERVER-33632</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2135190">SERVER-69627</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>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="24444"><![CDATA[v6.1]]></customfieldvalue>
    <customfieldvalue key="23470"><![CDATA[v6.0]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.0]]></customfieldvalue>
    <customfieldvalue key="18953"><![CDATA[v4.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 6 Sep 2022 14:01:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 16 weeks, 2 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>
                            1 year, 16 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11.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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>gregory.noma@mongodb.com</customfieldvalue>
            <customfieldvalue>suganthi.mani@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i18rb3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0jf9w:rr</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="6330">Execution Team 2022-09-19</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|i18dgf:</customfieldvalue>

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