<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:35:35 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-77449] SBE should support rooted $or queries with clustered indexes </title>
                <link>https://jira.mongodb.org/browse/SERVER-77449</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77280&quot; title=&quot;$or queries only produce collscan for clustered collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77280&quot;&gt;&lt;del&gt;SERVER-77280&lt;/del&gt;&lt;/a&gt; solves a bug where the OR stages do not consider clustered indexes during query planning. This is to unblock using text indexes in clustered collections (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61259&quot; title=&quot;$or queries with text indexes fail on clustered collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61259&quot;&gt;&lt;del&gt;SERVER-61259&lt;/del&gt;&lt;/a&gt;). In the classic engine the children of rooted OR queries can be either index scan or clustered index scans. We investigated supporting this in SBE, found these changes and decided to split the task into 2 tickets.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;For plans that use both IXSCAN and CLUSTERED_IXSCAN there is going to be a FETCH stage. However, the FETCH stage has &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/query/sbe_stage_builder.cpp#L947-L953&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;these requirements&lt;/a&gt; of its children, such as indexKey, but clustered collection scans don&#8217;t have these. These requirements would need to be removed for clustered collection scan nodes. However, if you remove these requirements for this node and the other $or child is an index scan, now the children of the $or query have different slots. This becomes a problem when we try to build a union stage that &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/exec/sbe/stages/union.cpp#L51-L54&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;assumes the children have the same number of slots&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;There is a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/query/sbe_stage_builder.cpp#L396-L398&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;tassert&lt;/a&gt;&#160;that assumes we only ever have one collection scan, but we can can have a plan now like OR with 2 clustered collection scans.&lt;/li&gt;
	&lt;li&gt;Clustered collection scans set slots for minRecordId and maxRecordId as environment variables. However, since now we can have 2 clustered collection scans, we face the error of having slots with a duplicate name.&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="2349700">SERVER-77449</key>
            <summary>SBE should support rooted $or queries with clustered indexes </summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="3">Duplicate</resolution>
                                        <assignee username="gil.alon@mongodb.com">Gil Alon</assignee>
                                    <reporter username="gil.alon@mongodb.com">Gil Alon</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 May 2023 19:03:03 +0000</created>
                <updated>Tue, 30 May 2023 19:02:31 +0000</updated>
                            <resolved>Thu, 25 May 2023 14:54:13 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5452007" author="JIRAUSER1260430" created="Thu, 25 May 2023 14:19:56 +0000"  >&lt;p&gt;We found a better solution and do not need to do what is described in the ticket to support rooted $or queries using clustered indexes in SBE. See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77280&quot; title=&quot;$or queries only produce collscan for clustered collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77280&quot;&gt;&lt;del&gt;SERVER-77280&lt;/del&gt;&lt;/a&gt; for the solution to the problem described above.&#160;&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>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        36 weeks, 6 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_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>gil.alon@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            36 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>gil.alon@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2apmv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1syn4:</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_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|i2abs7:</customfieldvalue>

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