<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:02:26 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-65327] AutoGetCollectionForRead should release secondary collection locks if any secondary namespace is a view or sharded, which is not supported</title>
                <link>https://jira.mongodb.org/browse/SERVER-65327</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;AutoGetCollectionForRead takes locks via its underlying AutoGetCollection, then checks the secondary namespaces and sets the value returned by isAnySecondaryNamespaceAViewOrSharded(), which indicates whether access to a secondary namespace is safe or not. However, the locks for the secondary namespaces are still held, which supports access in our low level systems (any lock invariants would pass). We should unlock the secondary namespaces.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2019291">SERVER-65327</key>
            <summary>AutoGetCollectionForRead should release secondary collection locks if any secondary namespace is a view or sharded, which is not supported</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-catalog-and-routing">Backlog - Catalog and Routing</assignee>
                                    <reporter username="dianna.hohensee@mongodb.com">Dianna Hohensee</reporter>
                        <labels>
                            <label>catalog</label>
                            <label>techdebt</label>
                    </labels>
                <created>Thu, 7 Apr 2022 14:07:34 +0000</created>
                <updated>Wed, 3 Jan 2024 10:32:59 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="5982448" author="kaloian.manassiev" created="Wed, 3 Jan 2024 10:32:34 +0000"  >&lt;blockquote&gt;&lt;p&gt;Do I understand correctly that with the acquisitions API, we would be able to do what we need (i.e. drop a subset of locks/collection acquisitions)?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mihai.andrei%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;mihai.andrei@mongodb.com&quot;&gt;mihai.andrei@mongodb.com&lt;/a&gt;, yes this is correct. You will be able to drop individual acquisitions, which will free the locks (or any resources held) for the collections that they represent.&lt;/p&gt;</comment>
                            <comment id="5857617" author="mihai.andrei" created="Mon, 6 Nov 2023 16:17:32 +0000"  >&lt;p&gt;&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; Yes, my understanding is that this is about the locked (as opposed to lock free) case. From what I remember, this is tied to $lookup pushdown in SBE (for context, $lookup in SBE requires locks for all involved namespaces, but this is not so for classic $lookup: we are only allowed to hold a lock on the outermost collection). If we take our locks and determine during query planning that we can&apos;t push down $lookup, we need a way to drop the secondary locks, but hold the lock on the main collection and proceed with planning. &lt;/p&gt;

&lt;p&gt;&amp;gt; Also, with the acquisition APIs, the above scenarios are not illegal.&lt;/p&gt;

&lt;p&gt;Do I understand correctly that with the acquisitions API, we would be able to do what we need (i.e. drop a subset of locks/collection acquisitions)?&lt;/p&gt;</comment>
                            <comment id="5851663" author="kaloian.manassiev" created="Fri, 3 Nov 2023 09:17:19 +0000"  >&lt;p&gt;Is this ticket really about the corner case where the locked variant of the AutoGetters took a lock on some namespace and then decided it cannot be used because it&apos;s sharded or a view? Why is  the AutoGetter even usable in that case? I imagine that if this happens, we just discard the auto-getter and all the locks get freed anyways. I guess my question is who cares about this case? &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Also, with the acquisition APIs, the above scenarios are not illegal.&lt;/p&gt;</comment>
                            <comment id="4849467" author="dianna.hohensee" created="Thu, 22 Sep 2022 19:34:15 +0000"  >&lt;p&gt;&lt;tt&gt;AutoGetCollection&lt;/tt&gt; holds the &lt;tt&gt;CollectionLocks&lt;/tt&gt; for all the namespaces, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a711b08cf587600a4c52b4df9a2fcb9789b834f8/src/mongo/db/catalog_raii.h#L248&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;combined in a vector&lt;/a&gt;, while &lt;tt&gt;AutoGetCollectionForRead&lt;/tt&gt; does the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a711b08cf587600a4c52b4df9a2fcb9789b834f8/src/mongo/db/db_raii.cpp#L652-L653&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;isAnySecondaryNamespaceAViewOrSharded&lt;/tt&gt; check&lt;/a&gt;.  So would require some internal and interface adjustments and additions.&lt;/p&gt;</comment>
                            <comment id="4849452" author="dianna.hohensee" created="Thu, 22 Sep 2022 19:25:54 +0000"  >&lt;p&gt;This still exists. For example, AutoGetCollectionForRead &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a711b08cf587600a4c52b4df9a2fcb9789b834f8/src/mongo/db/db_raii.cpp#L642-L643&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;instantiates an AutoGetCollection&lt;/a&gt;, which has already taken any secondary namespace locks specified, and then afterward &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a711b08cf587600a4c52b4df9a2fcb9789b834f8/src/mongo/db/db_raii.cpp#L652-L653&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sets the flag and returns&lt;/a&gt;. Even if the flag is set, indicating that a secondary namespace was found to be sharded, the locks remain held when the constructor returns. &lt;/p&gt;

&lt;p&gt;Aggregation &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a711b08cf587600a4c52b4df9a2fcb9789b834f8/src/mongo/db/commands/run_aggregate.cpp#L713-L723&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;doesn&apos;t reset the AutoGetCollection* instance based on the results of that flag&lt;/a&gt;, the command simply proceeds. Query uses the flag to make some decisions, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a711b08cf587600a4c52b4df9a2fcb9789b834f8/src/mongo/db/pipeline/pipeline_d.cpp#L163-L165&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;like here&lt;/a&gt;, but I have no idea what actions are taken or not taken based on the flag.&lt;/p&gt;</comment>
                            <comment id="4611292" author="connie.chen" created="Mon, 13 Jun 2022 15:11:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dianna.hohensee%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;dianna.hohensee@mongodb.com&quot;&gt;dianna.hohensee@mongodb.com&lt;/a&gt; - assigning this into your next sprint, we&apos;re mainly curious about if this still applies in our current state. Feel free to throw this back into triage if you think this has changed.&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>6.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_23577" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>CAR Impact</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25715"><![CDATA[2 Medium  (users + team) or (team + external teams)]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 13 Jun 2022 15:11:37 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-3410</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>kaloian.manassiev@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-catalog-and-routing</customfieldvalue>
            <customfieldvalue>connie.chen@mongodb.com</customfieldvalue>
            <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>mihai.andrei@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0qadj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i13mgk:</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_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </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|i0pwiv:</customfieldvalue>

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