<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:43:19 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>[COMPASS-6496] Incorrect calculation of &quot;Actual query execution time&quot; for explain plan of aggregation</title>
                <link>https://jira.mongodb.org/browse/COMPASS-6496</link>
                <project id="13182" key="COMPASS">Compass </project>
                    <description>&lt;h3&gt;&lt;a name=&quot;ProblemStatement%2FRationale&quot;&gt;&lt;/a&gt;&lt;b&gt;Problem Statement/Rationale&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;What is going wrong? What action would you like the Engineering team to take?&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Please be sure to attach relevant logs &lt;em&gt;with any sensitive data redacted&lt;/em&gt;.&lt;/b&gt;&lt;br/&gt;
Incorrect calculation of &quot;Actual query execution time&quot; for explain plan of aggregation&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;StepstoReproduce&quot;&gt;&lt;/a&gt;&lt;b&gt;Steps to Reproduce&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;How could an engineer replicate the issue you&#8217;re reporting?&lt;br/&gt;
&lt;br/&gt;
Connect Compass to an unsharded MongoDB 6.0.4 replica set (this bug may also be reproducible on older versions, or sharded sets but I have not attempted this).&lt;br/&gt;
&lt;br/&gt;
Create an aggregation from a collection that executes with a cursor in the first stage, and lookup stages that are resolved using &apos;explainVersion: 2&apos; (slot based execution)&lt;br/&gt;
- Ideally a long-running aggregation pipeline with multiple stages to accentuate the bug&lt;br/&gt;
&lt;br/&gt;
Click &quot;Explain&quot; and wait for the &quot;Explain Plan&quot; modal to resolve.&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;ExpectedResults&quot;&gt;&lt;/a&gt;&lt;b&gt;Expected Results&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;What do you expect to happen?&lt;br/&gt;
&lt;br/&gt;
Accurate &quot;Actual query execution time&quot; to be displayed&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;ActualResults&quot;&gt;&lt;/a&gt;&lt;b&gt;Actual Results&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;What do you observe is happening?&lt;br/&gt;
&lt;br/&gt;
Actual query execution time appears to be inflated as the sum of&lt;br/&gt;
&lt;br/&gt;
stages.0.$cursor.executionStats.executionTimeMillis &lt;br/&gt;
+ ... stages.&lt;span class=&quot;error&quot;&gt;&amp;#91;1...n&amp;#93;&lt;/span&gt;.executionTimeMillisEstimate&lt;br/&gt;
&lt;br/&gt;
It appears that the stages.0.$cursor.executionStats.executionTimeMillis value is infact the total execution time of the aggregation for all stages&lt;br/&gt;
&lt;br/&gt;
The values for stages.&lt;span class=&quot;error&quot;&gt;&amp;#91;1...n&amp;#93;&lt;/span&gt;.executionTimeMillisEstimate appear to be cumulative running totals (so should not be summed in any case?)&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;AdditionalNotes&quot;&gt;&lt;/a&gt;&lt;b&gt;Additional Notes&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;Any additional information that may be useful to include.&lt;br/&gt;
&lt;br/&gt;
This calculation appears to happen here: &lt;a href=&quot;https://github.com/mongodb-js/compass/blob/67beee814b386f1b31e6f72230f655af04a59fa2/packages/explain-plan-helper/src/get-execution-stats.ts#L110-L118&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/blob/67beee814b386f1b31e6f72230f655af04a59fa2/packages/explain-plan-helper/src/get-execution-stats.ts#L110-L118&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;</description>
                <environment>Compass 1.35.0, Mac</environment>
        <key id="2253234">COMPASS-6496</key>
            <summary>Incorrect calculation of &quot;Actual query execution time&quot; for explain plan of aggregation</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="sergey.petushkov@mongodb.com">Sergey Petushkov</assignee>
                                    <reporter username="ryan@suvera.co.uk">Ryan Peggs</reporter>
                        <labels>
                    </labels>
                <created>Sun, 5 Feb 2023 15:22:54 +0000</created>
                <updated>Sun, 29 Oct 2023 02:38:37 +0000</updated>
                            <resolved>Wed, 7 Jun 2023 13:35:45 +0000</resolved>
                                                    <fixVersion>1.38.0</fixVersion>
                                    <component>Explain</component>
                        <due></due>
                            <votes>1</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5505230" author="xgen-internal-githook" created="Fri, 16 Jun 2023 14:18:17 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Sergey Petushkov&apos;, &apos;email&apos;: &apos;petushkov.sergey@gmail.com&apos;, &apos;username&apos;: &apos;gribnoysup&apos;}
&lt;p&gt;Message: fix(explain-plan-helper): do not sum execution time for aggregation explain plan &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-6496&quot; title=&quot;Incorrect calculation of &amp;quot;Actual query execution time&amp;quot; for explain plan of aggregation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-6496&quot;&gt;&lt;del&gt;COMPASS-6496&lt;/del&gt;&lt;/a&gt; (#4480)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;fix(explain-plan-helper): do not sum execution time for aggregation explain plan&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;chore(explain-plan-helper): fix typo in comment&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;/p&gt;

&lt;p&gt;---------&lt;/p&gt;

&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: activity-telemetry&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5490270" author="xgen-internal-githook" created="Sat, 10 Jun 2023 19:53:50 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Sergey Petushkov&apos;, &apos;email&apos;: &apos;petushkov.sergey@gmail.com&apos;, &apos;username&apos;: &apos;gribnoysup&apos;}
&lt;p&gt;Message: fix(explain-plan-helper): do not sum execution time for aggregation explain plan &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-6496&quot; title=&quot;Incorrect calculation of &amp;quot;Actual query execution time&amp;quot; for explain plan of aggregation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-6496&quot;&gt;&lt;del&gt;COMPASS-6496&lt;/del&gt;&lt;/a&gt; (#4480)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;fix(explain-plan-helper): do not sum execution time for aggregation explain plan&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;chore(explain-plan-helper): fix typo in comment&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;/p&gt;

&lt;p&gt;---------&lt;/p&gt;

&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: redux-typescript-query-history-store&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5487979" author="xgen-internal-githook" created="Fri, 9 Jun 2023 14:00:15 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Sergey Petushkov&apos;, &apos;email&apos;: &apos;petushkov.sergey@gmail.com&apos;, &apos;username&apos;: &apos;gribnoysup&apos;}
&lt;p&gt;Message: fix(explain-plan-helper): do not sum execution time for aggregation explain plan &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-6496&quot; title=&quot;Incorrect calculation of &amp;quot;Actual query execution time&amp;quot; for explain plan of aggregation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-6496&quot;&gt;&lt;del&gt;COMPASS-6496&lt;/del&gt;&lt;/a&gt; (#4480)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;fix(explain-plan-helper): do not sum execution time for aggregation explain plan&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;chore(explain-plan-helper): fix typo in comment&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;/p&gt;

&lt;p&gt;---------&lt;/p&gt;

&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: 1.38-releases&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5480534" author="xgen-internal-githook" created="Wed, 7 Jun 2023 11:15:03 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Sergey Petushkov&apos;, &apos;email&apos;: &apos;petushkov.sergey@gmail.com&apos;, &apos;username&apos;: &apos;gribnoysup&apos;}
&lt;p&gt;Message: fix(explain-plan-helper): do not sum execution time for aggregation explain plan &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-6496&quot; title=&quot;Incorrect calculation of &amp;quot;Actual query execution time&amp;quot; for explain plan of aggregation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-6496&quot;&gt;&lt;del&gt;COMPASS-6496&lt;/del&gt;&lt;/a&gt; (#4480)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;fix(explain-plan-helper): do not sum execution time for aggregation explain plan&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;chore(explain-plan-helper): fix typo in comment&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;/p&gt;

&lt;p&gt;---------&lt;/p&gt;

&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-6511&quot; title=&quot;Index suggestions in &amp;quot;Indexes&amp;quot; tab missing sparse keys&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-6511&quot;&gt;&lt;del&gt;COMPASS-6511&lt;/del&gt;&lt;/a&gt;-select-combobox-option-on-blur&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5479084" author="xgen-internal-githook" created="Tue, 6 Jun 2023 18:43:39 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Sergey Petushkov&apos;, &apos;email&apos;: &apos;petushkov.sergey@gmail.com&apos;, &apos;username&apos;: &apos;gribnoysup&apos;}
&lt;p&gt;Message: fix(explain-plan-helper): do not sum execution time for aggregation explain plan &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-6496&quot; title=&quot;Incorrect calculation of &amp;quot;Actual query execution time&amp;quot; for explain plan of aggregation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-6496&quot;&gt;&lt;del&gt;COMPASS-6496&lt;/del&gt;&lt;/a&gt; (#4480)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;fix(explain-plan-helper): do not sum execution time for aggregation explain plan&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;chore(explain-plan-helper): fix typo in comment&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;/p&gt;

&lt;p&gt;---------&lt;/p&gt;

&lt;p&gt;Co-authored-by: Rhys &amp;lt;Anemy@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: main&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/b2733835a3b65a4990e1af518669453fad1aba04&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="431235" name="Screenshot 2023-02-10 at 09.40.53.png" size="64336" author="tim@suvera.co.uk" created="Fri, 10 Feb 2023 09:45:16 +0000"/>
                            <attachment id="431234" name="Screenshot 2023-02-10 at 09.41.18.png" size="67499" author="tim@suvera.co.uk" created="Fri, 10 Feb 2023 09:45:16 +0000"/>
                            <attachment id="431236" name="Screenshot 2023-02-10 at 09.42.07.png" size="67057" author="tim@suvera.co.uk" created="Fri, 10 Feb 2023 09:45:16 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 6 Feb 2023 13:11:10 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        33 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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>COMPASS-6441</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>
                            33 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>ryan@suvera.co.uk</customfieldvalue>
            <customfieldvalue>sergey.petushkov@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1u1xj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1citc:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7120">Iteration Whale</customfieldvalue>
    <customfieldvalue id="7227">Iteration Xantic Sargo</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1to2v:</customfieldvalue>

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