<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:56: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-62981] Make SBE multi-planner&apos;s trial period termination condition independent of collection size</title>
                <link>https://jira.mongodb.org/browse/SERVER-62981</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;MongoDB currently uses a runtime plan selection strategy to choose a winning query plan from amongst a set of candidates. This process is called &quot;multi-planning&quot;, and it involves partially executing each candidate, and then using the resulting runtime statistics to make a plan choice. The classic execution engine and the SBE execution engine have different implementations of multi-planning. The SBE multi-planner is affected by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62150&quot; title=&quot;SBE Multiplanning can be slow when suboptimal plan runs first&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62150&quot;&gt;SERVER-62150&lt;/a&gt;, a performance bug which can cause the SBE multi-planner to be much more expensive than the classic multi-planner. This ticket tracks an idea to mitigate &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62150&quot; title=&quot;SBE Multiplanning can be slow when suboptimal plan runs first&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62150&quot;&gt;SERVER-62150&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The SBE multi-planner inherited some logic from the classic multi-planner where the maximum number of storage reads allowed during the trial period is calculated as either 10,000 or 30% of the collection, whichever is larger. (&lt;a href=&quot;https://github.com/mongodb/mongo/blob/c22bc6aaf0b83ec2a389f75351c527439d1a9611/src/mongo/db/query/query_knobs.idl#L41-L58&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;These constants are configurable as setParameters&lt;/a&gt;, but are generally not reconfigured in the field.) This potentially high bound of 30% of the collection size is not overly problematic for the classic multi-planner because of its round-robin behavior &amp;#8211; each plan does a small amount of work in a round-robin fashion until a winner is found. This means that with the exception of the scenario described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31078&quot; title=&quot;Query planning is very slow during multiplanning when result set is empty&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31078&quot;&gt;SERVER-31078&lt;/a&gt;, the length of the classic multi-planner trial period should be relatively well bounded.&lt;/p&gt;

&lt;p&gt;Not so for the SBE multi-planner. The absence of round-robin plan execution in the SBE multi-planner means that we can easily hit the 30% of the collection size limit even if there is a much better plan available. Therefore, the proposal for this ticket is to introduce a new setParameter which is symmetric with &lt;tt&gt;internalQueryPlanEvaluationCollFraction&lt;/tt&gt; called &lt;tt&gt;internalQueryPlanEvaluationCollFractionSbe&lt;/tt&gt;. The former parameter, &lt;tt&gt;internalQueryPlanEvaluationCollFraction&lt;/tt&gt;, will apply only to the classic multi-planner whereas &lt;tt&gt;internalQueryPlanEvaluationCollFractionSbe&lt;/tt&gt; will apply only to the SBE multi-planner. Importantly, we will choose a default value of 0 for &lt;tt&gt;internalQueryPlanEvaluationCollFractionSbe&lt;/tt&gt;. This means that the length of an individual SBE candidate plan&apos;s trial period will be bounded to 10,000 storage cursor reads, which should avoid the worst affects of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62150&quot; title=&quot;SBE Multiplanning can be slow when suboptimal plan runs first&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62150&quot;&gt;SERVER-62150&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1970971">SERVER-62981</key>
            <summary>Make SBE multi-planner&apos;s trial period termination condition independent of collection size</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="david.storch@mongodb.com">David Storch</assignee>
                                    <reporter username="david.storch@mongodb.com">David Storch</reporter>
                        <labels>
                            <label>RDY</label>
                            <label>query-director-triage</label>
                    </labels>
                <created>Tue, 25 Jan 2022 23:40:42 +0000</created>
                <updated>Sun, 29 Oct 2023 21:43:38 +0000</updated>
                            <resolved>Thu, 27 Jan 2022 18:11:50 +0000</resolved>
                                                    <fixVersion>5.3.0</fixVersion>
                    <fixVersion>5.2.1</fixVersion>
                                    <component>Query Execution</component>
                    <component>Query Planning</component>
                                        <votes>0</votes>
                                    <watches>21</watches>
                                                                                                                <comments>
                            <comment id="4319184" author="xgen-internal-githook" created="Thu, 27 Jan 2022 19:15:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;David Storch&apos;, &apos;email&apos;: &apos;david.storch@mongodb.com&apos;, &apos;username&apos;: &apos;dstorch&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62981&quot; title=&quot;Make SBE multi-planner&amp;#39;s trial period termination condition independent of collection size&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62981&quot;&gt;&lt;del&gt;SERVER-62981&lt;/del&gt;&lt;/a&gt; Make SBE multi-planner trial period length independent of collection size&lt;/p&gt;

&lt;p&gt;This patch changes the &apos;internalQueryPlanEvaluationCollFraction&apos; knob&lt;br/&gt;
to apply only to the classic engine. It introduces a separate knob,&lt;br/&gt;
&apos;internalQueryPlanEvaluationCollFractionSbe&apos;, which applies only to&lt;br/&gt;
the SBE engine. The SBE knob has a default of 0, while the classic&lt;br/&gt;
engine retains its default of 0.3. This ensures that by default, no&lt;br/&gt;
candidate plan will ever do more than 10,000 storage reads during SBE&lt;br/&gt;
multi-planning.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit f27f088ecf14825a2ae9cedb2c13093287ded84a)&lt;br/&gt;
Branch: v5.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4144aaa465fa4bef36a71caea8e9b6af3b3c7b46&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4144aaa465fa4bef36a71caea8e9b6af3b3c7b46&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4318476" author="xgen-internal-githook" created="Thu, 27 Jan 2022 15:53:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;David Storch&apos;, &apos;email&apos;: &apos;david.storch@mongodb.com&apos;, &apos;username&apos;: &apos;dstorch&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62981&quot; title=&quot;Make SBE multi-planner&amp;#39;s trial period termination condition independent of collection size&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62981&quot;&gt;&lt;del&gt;SERVER-62981&lt;/del&gt;&lt;/a&gt; Make SBE multi-planner trial period length independent of collection size&lt;/p&gt;

&lt;p&gt;This patch changes the &apos;internalQueryPlanEvaluationCollFraction&apos; knob&lt;br/&gt;
to apply only to the classic engine. It introduces a separate knob,&lt;br/&gt;
&apos;internalQueryPlanEvaluationCollFractionSbe&apos;, which applies only to&lt;br/&gt;
the SBE engine. The SBE knob has a default of 0, while the classic&lt;br/&gt;
engine retains its default of 0.3. This ensures that by default, no&lt;br/&gt;
candidate plan will ever do more than 10,000 storage reads during SBE&lt;br/&gt;
multi-planning.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f27f088ecf14825a2ae9cedb2c13093287ded84a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f27f088ecf14825a2ae9cedb2c13093287ded84a&lt;/a&gt;&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="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1973289">SERVER-63102</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1983353">SERVER-63642</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1983346">SERVER-63641</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1953500">SERVER-62150</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="427131">SERVER-31078</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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="22676"><![CDATA[v5.2]]></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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K000011D6HxQAK]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 26 Jan 2022 15:54:16 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 1 week, 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_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>This ticket changes the &amp;#39;internalQueryPlanEvaluationCollFraction&amp;#39; knob to apply only to the classic engine. It introduces a separate knob, &amp;#39;internalQueryPlanEvaluationCollFractionSbe&amp;#39;, which applies only to the SBE engine. The SBE knob has a default of 0, while the classic engine retains its default of 0.3. This ensures that by default, no candidate plan will ever do more than 10,000 storage reads during SBE multi-planning.</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16942"><![CDATA[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>
                            2 years, 1 week, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>150.0</customfieldvalue>

                        </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|i0i2d3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i015tz:</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="5283">QE 2022-02-07</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_17051" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Teams Impacted</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16946"><![CDATA[Triage and Release]]></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|i0hoif:</customfieldvalue>

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