<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:15:31 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-47889] Hidden index tests should verify index filter behaviour</title>
                <link>https://jira.mongodb.org/browse/SERVER-47889</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In addition to their current coverage, the index filter tests should verify that:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;When a query with a shape matching an index filter is executed, the index referenced by the filter is &lt;b&gt;not&lt;/b&gt; used to answer the query if that index is currently hidden&lt;/li&gt;
	&lt;li&gt;If an alternative non-hidden index is available in the filter, it is used to answer the query. Otherwise, the planner outputs a &lt;tt&gt;COLLSCAN&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;Un-hiding the index restores the index filter behaviour&lt;/li&gt;
	&lt;li&gt;It is legal to set an index filter on a hidden index, but the index will not actually be used until it is made visible&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1335921">SERVER-47889</key>
            <summary>Hidden index tests should verify index filter behaviour</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="13201">Fixed</resolution>
                                        <assignee username="ruoxin.xu@mongodb.com">Ruoxin Xu</assignee>
                                    <reporter username="bernard.gorman@mongodb.com">Bernard Gorman</reporter>
                        <labels>
                    </labels>
                <created>Fri, 1 May 2020 16:23:59 +0000</created>
                <updated>Sun, 29 Oct 2023 22:08:48 +0000</updated>
                            <resolved>Fri, 8 May 2020 12:57:19 +0000</resolved>
                                                    <fixVersion>4.4.0-rc6</fixVersion>
                    <fixVersion>4.7.0</fixVersion>
                                    <component>Index Maintenance</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3076724" author="xgen-internal-githook" created="Fri, 8 May 2020 22:27:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ruoxin Xu&apos;, &apos;email&apos;: &apos;ruoxin.xu@mongodb.com&apos;, &apos;username&apos;: &apos;RuoxinXu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47889&quot; title=&quot;Hidden index tests should verify index filter behaviour&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47889&quot;&gt;&lt;del&gt;SERVER-47889&lt;/del&gt;&lt;/a&gt; Hidden index tests should verify index filter behaviour&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 3f124535f04261cb5b9c85528d0971e44ec77128)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/20ba463a85e3fd4af08e8047a7007865a12f8545&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/20ba463a85e3fd4af08e8047a7007865a12f8545&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3075446" author="xgen-internal-githook" created="Fri, 8 May 2020 11:08:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ruoxin Xu&apos;, &apos;email&apos;: &apos;ruoxin.xu@mongodb.com&apos;, &apos;username&apos;: &apos;RuoxinXu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47889&quot; title=&quot;Hidden index tests should verify index filter behaviour&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47889&quot;&gt;&lt;del&gt;SERVER-47889&lt;/del&gt;&lt;/a&gt; Hidden index tests should verify index filter behaviour&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3f124535f04261cb5b9c85528d0971e44ec77128&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3f124535f04261cb5b9c85528d0971e44ec77128&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3073715" author="bernard.gorman" created="Thu, 7 May 2020 13:57:07 +0000"  >&lt;p&gt;Re: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ruoxin.xu&quot; class=&quot;user-hover&quot; rel=&quot;ruoxin.xu&quot;&gt;ruoxin.xu&lt;/a&gt;&apos;s comment above:&lt;/p&gt;

&lt;p&gt;We briefly considered changing the scope of this ticket to alter the behaviour of index filters as follows:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Consider the scenario where an index filter is set on index A, and there are 3 other indexes NOT in the filter that could answer the same query shape. If you then hide index A, the planner will NOT choose one of the other 3 indexes to answer the query; instead, it will produce a &lt;tt&gt;COLLSCAN&lt;/tt&gt;. Hiding an index which is referenced in an index filter has the same effect as setting an index filter on a non-existent index; the planner will blindly apply the filters, match no indexes, and output a &lt;tt&gt;COLLSCAN&lt;/tt&gt;, regardless of how many eligible indexes actually exist.&lt;/p&gt;

&lt;p&gt;However, in the case where we have &lt;b&gt;hidden&lt;/b&gt; all indexes captured by the filter, the more desirable behaviour would be to ignore the index filter altogether. Specifically:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;If the index filter captures N indexes, and &amp;lt; N are hidden, then the filter is still applied because the remaining indexes are still eligible for filtering.&lt;/li&gt;
	&lt;li&gt;If all indexes captured by the filter are hidden, then &lt;b&gt;the filter itself effectively becomes hidden&lt;/b&gt;. The filter is not applied at all and any non-filtered non-hidden indexes are eligible to answer the query.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;However, we ultimately decided to leave the behaviour as-is. The purpose of hiding an index is to simulate what would happen if it were dropped, and we should therefore not add special logic to avoid the consequences just because an index filter is present. If we were to ignore the index filter when its associated index is hidden, so that the planner instead starts choosing non-filter indexes, then the user might be lulled into a false sense of security; dropping the hidden index with the index filter still present would immediately begin producing &lt;tt&gt;COLLSCANS&lt;/tt&gt; instead, since the filter would now match zero indexes.&lt;/p&gt;</comment>
                            <comment id="3072513" author="ruoxin.xu" created="Wed, 6 May 2020 19:18:09 +0000"  >&lt;p&gt;Just to be clear about an edge case for the definition above - if the index filter captures &lt;b&gt;0&lt;/b&gt; index, according to the definition, we should &apos;hide&apos; this index filter as well. This may affect the current behaviour when the user sets a non-existent index, which would make the planner apply the filter filtering all the indexes and the user will just get a &lt;b&gt;COLLSCAN&lt;/b&gt;. This change that enables &apos;hiding&apos; a filter will cause the current behaviour for &apos;setting on a non-existent index&apos; also &apos;hide&apos; the filter. Do we also expect this behaviour for index filter?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </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>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <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, 5 May 2020 10:25:20 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 39 weeks, 5 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>
                            3 years, 39 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>bernard.gorman@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>ruoxin.xu@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxiuuf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hx5s3b:</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="3500">Query 2020-05-18</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|hxih3r:</customfieldvalue>

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