<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:52:13 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-19835] SubplanStage should not cache plan for an individual $or branch if plans tie or there are no query results</title>
                <link>https://jira.mongodb.org/browse/SERVER-19835</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Versions 2.6.x and 3.0.x will not create a plan cache entry for a query shape if, during plan selection, either&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;the winning plan ties with the runner-up, or&lt;/li&gt;
	&lt;li&gt;the winning plan does not produce any results during the MultiPlanStage trial period.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The intention behind this behavior is that in these edge cases the system has low confidence that it has selected the best plan. In order to avoid re-using the wrong plan from the cache for a subsequent execution of the query shape, the system refrains from creating a potentially erroneous cache entry.&lt;/p&gt;

&lt;p&gt;In version 3.1.2 under &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-15225&quot; title=&quot;CachedPlanStage should execute for trial period and re-plan if query performs poorly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-15225&quot;&gt;&lt;del&gt;SERVER-15225&lt;/del&gt;&lt;/a&gt;, behavior was introduced to aggressively evict bad cache entries. This aggressive eviction obviated the need for not caching in case of ties or zero results, and therefore the system changed to &lt;em&gt;always&lt;/em&gt; create a cache entry.&lt;/p&gt;

&lt;p&gt;However, due to a detail in the implementation of the SubplanStage, &lt;tt&gt;$or&lt;/tt&gt; queries which use the subplan path do not benefit from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-15225&quot; title=&quot;CachedPlanStage should execute for trial period and re-plan if query performs poorly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-15225&quot;&gt;&lt;del&gt;SERVER-15225&lt;/del&gt;&lt;/a&gt;&apos;s plan cache eviction logic. This means that subplanned queries can experience a performance regression in which they choose the wrong plan in 3.1.x unstable releases greater than or equal to 3.1.2.&lt;/p&gt;

&lt;p&gt;We should correct this regression by re-introducing the &quot;don&apos;t cache ties or zero result queries&quot;, just for queries that use the SubplanStage.&lt;/p&gt;</description>
                <environment></environment>
        <key id="224733">SERVER-19835</key>
            <summary>SubplanStage should not cache plan for an individual $or branch if plans tie or there are no query results</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="9">Done</resolution>
                                        <assignee username="david.storch@mongodb.com">David Storch</assignee>
                                    <reporter username="david.storch@mongodb.com">David Storch</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Aug 2015 20:37:21 +0000</created>
                <updated>Sat, 19 Sep 2015 00:09:08 +0000</updated>
                            <resolved>Tue, 11 Aug 2015 16:12:37 +0000</resolved>
                                    <version>3.1.2</version>
                                    <fixVersion>3.1.7</fixVersion>
                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1002084" author="xgen-internal-githook" created="Tue, 11 Aug 2015 16:12:05 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dstorch&apos;, u&apos;name&apos;: u&apos;David Storch&apos;, u&apos;email&apos;: u&apos;david.storch@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19835&quot; title=&quot;SubplanStage should not cache plan for an individual $or branch if plans tie or there are no query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19835&quot;&gt;&lt;del&gt;SERVER-19835&lt;/del&gt;&lt;/a&gt; change SubplanStage to skip creation of a plan cache entry in edge cases&lt;/p&gt;

&lt;p&gt;Since the SubplanStage does not benefit from the CachedPlanStage&apos;s replanning, it should not create&lt;br/&gt;
a cache entry if there is a plan ranking tie or if zero results are produced during the plan ranking&lt;br/&gt;
trial period.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3f8b8b495fbe5303bb39dcd2ba5708275f482d2e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3f8b8b495fbe5303bb39dcd2ba5708275f482d2e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="999804" author="david.storch" created="Fri, 7 Aug 2015 20:39:11 +0000"  >&lt;p&gt;Note that the work planned for this ticket is intended to provide a stopgap fix for the regression until we find a satisfactory solution for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18777&quot; title=&quot;CachedPlanStage replanning mechanism does not apply to rooted $or queries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18777&quot;&gt;SERVER-18777&lt;/a&gt;. That is, a more complete fix would introduce the cached plan eviction and replanning logic to the SubplanStage.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="207697">SERVER-18777</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="157798">SERVER-15225</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>1.0</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, 11 Aug 2015 16:12:05 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 27 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_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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 27 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrky3r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hreetb:</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="641">QuInt 8 08/28/15</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_11861" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>User Summary</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11856"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsfrpb:</customfieldvalue>

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