<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:39:23 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-56486] SBE multi-planning trial period could run much longer than its equivalent in the classic engine</title>
                <link>https://jira.mongodb.org/browse/SERVER-56486</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;For context, here is a brief description of how the trial period in the classic engine works, assuming that we have two plans, A and B. Given a budget of &quot;work units&quot;, usually set to something fairly large such as 10,000 works, we allow each plan to do a unit of work in a round robin fashion. That is, A performs one unit of work, then B performs one unit of work, then A performs a second work, B a second work, and so on. If at any point during this process one of the plans reaches EOF, then that plan becomes the winner and the trial period ends.&lt;/p&gt;

&lt;p&gt;The SBE multi-planner is fundamentally different because there is no concept of &quot;works&quot;. Instead, each plan is granted a similar budget of &quot;reads&quot;. A read is defined here as a single operation on a storage engine cursor, such as an index seek or reading a single index key. The budget is calculated in the same way as for the classic engine, so it is something pretty large such as 10,000. Instead of the round-robin units of work, the SBE multi-planner will execute each plan until it either reaches its budget and &quot;exits early&quot;, or reaches EOF. First, plan A executes until hitting its budget or EOF, and then plan B does the same.&lt;/p&gt;

&lt;p&gt;Let&apos;s suppose that plan A reaches EOF with approximately 10 works/reads, but plan B requires 100,000. In a scenario like this, SBE multi-planning takes much longer than classic engine multi-planning to achieve the same result. The classic engine will work each plan 10 times, at which point A reaches EOF and the trial period ends. In contrast, SBE will first execute plan A. It performs 10 reads and finishes. Then, SBE will execute plan B. It executes 10,000 reads before it hits its budget and exits early. They key observation is that SBE has done orders or magnitude more work as part of the multi-planning trial period.&lt;/p&gt;

&lt;p&gt;One way to mitigate this would be to progressively lower the budget of reads as each plan runs its trial period. However, this would only work if the best plan happens to run its trial period first. The issue would still occur if the bad plans run their trial period first, and the best plan runs its trial last.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1696089">SERVER-56486</key>
            <summary>SBE multi-planning trial period could run much longer than its equivalent in the classic engine</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="13201">Fixed</resolution>
                                        <assignee username="mihai.andrei@mongodb.com">Mihai Andrei</assignee>
                                    <reporter username="david.storch@mongodb.com">David Storch</reporter>
                        <labels>
                            <label>sbe-post-v1</label>
                            <label>sbe-rollout</label>
                    </labels>
                <created>Thu, 29 Apr 2021 15:46:23 +0000</created>
                <updated>Sun, 29 Oct 2023 21:54:17 +0000</updated>
                            <resolved>Fri, 16 Jul 2021 20:52:51 +0000</resolved>
                                                    <fixVersion>5.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4108145" author="JIRAUSER1259052" created="Wed, 6 Oct 2021 18:58:20 +0000"  >&lt;p&gt;Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it&#8217;s been triggered. For more active release information, please keep an eye on #server-release. Thank you!&lt;/p&gt;</comment>
                            <comment id="3947962" author="xgen-internal-githook" created="Fri, 16 Jul 2021 20:49:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Mihai Andrei&apos;, &apos;email&apos;: &apos;mihai.andrei@10gen.com&apos;, &apos;username&apos;: &apos;mtandrei&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56486&quot; title=&quot;SBE multi-planning trial period could run much longer than its equivalent in the classic engine&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56486&quot;&gt;&lt;del&gt;SERVER-56486&lt;/del&gt;&lt;/a&gt; Improve SBE multiplanner&lt;/p&gt;

&lt;p&gt;This patch introduces a number of improvements to the SBE multiplanner.&lt;br/&gt;
In particular:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;We no longer run plans in round-robin fashion (i.e. switch between&lt;br/&gt;
plans until each has returned one result, and so on). Instead, each&lt;br/&gt;
plan runs until it finishes its trial period.&lt;/li&gt;
	&lt;li&gt;The number of reads is progressively decreased. More precisely, the&lt;br/&gt;
number of reads used by a plan during is trial period is used as the&lt;br/&gt;
maximum number of reads for subsequent plans.&lt;/li&gt;
	&lt;li&gt;Non blocking plans are run before blocking ones. This is a heuristic&lt;br/&gt;
that limits the amount of work done by a blocking plan as each blocking&lt;br/&gt;
plan will now be bounded by the smallest number of reads used by a non&lt;br/&gt;
blocking plan during its trial period.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e4d2f7606d0500028c8cb1389ac86f1a93cecad1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e4d2f7606d0500028c8cb1389ac86f1a93cecad1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="3913653" author="xgen-internal-githook" created="Thu, 1 Jul 2021 23:18:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Mihai Andrei&apos;, &apos;email&apos;: &apos;mihai.andrei@10gen.com&apos;, &apos;username&apos;: &apos;mtandrei&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56486&quot; title=&quot;SBE multi-planning trial period could run much longer than its equivalent in the classic engine&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56486&quot;&gt;&lt;del&gt;SERVER-56486&lt;/del&gt;&lt;/a&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;SBE&amp;#93;&lt;/span&gt; Run non blocking plans first in multiplanner to set an upper bounds for blocking plans&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit 3645e5b8f5367a1c543d73c441c1364eeac2d783.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/951dfeb5aca55cc881293372dfda4b72bb478b92&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/951dfeb5aca55cc881293372dfda4b72bb478b92&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3912546" author="xgen-internal-githook" created="Thu, 1 Jul 2021 16:12:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Mihai Andrei&apos;, &apos;email&apos;: &apos;mihai.andrei@10gen.com&apos;, &apos;username&apos;: &apos;mtandrei&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56486&quot; title=&quot;SBE multi-planning trial period could run much longer than its equivalent in the classic engine&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56486&quot;&gt;&lt;del&gt;SERVER-56486&lt;/del&gt;&lt;/a&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;SBE&amp;#93;&lt;/span&gt; Run non blocking plans first in multiplanner to set an upper bounds for blocking plans&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3645e5b8f5367a1c543d73c441c1364eeac2d783&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3645e5b8f5367a1c543d73c441c1364eeac2d783&lt;/a&gt;&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>6.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="21777"><![CDATA[v5.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, 18 May 2021 12:42:01 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 18 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_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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2361</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, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></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>
            <customfieldvalue>mihai.andrei@mongodb.com</customfieldvalue>
            <customfieldvalue>vivian.ge@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hz7eun:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hysatr:</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="4697">Query Execution 2021-05-17</customfieldvalue>
    <customfieldvalue id="4703">Query Execution 2021-05-31</customfieldvalue>
    <customfieldvalue id="4705">Query Execution 2021-06-14</customfieldvalue>
    <customfieldvalue id="4707">Query Execution 2021-06-28</customfieldvalue>
    <customfieldvalue id="4709">Query Execution 2021-07-12</customfieldvalue>
    <customfieldvalue id="4711">Query Execution 2021-07-26</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|hz713r:</customfieldvalue>

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