<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:11:31 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-46446] Log time spent waiting for remote operations</title>
                <link>https://jira.mongodb.org/browse/SERVER-46446</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This ticket is the find() counterpart of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31368&quot; title=&quot;Log time spent waiting for other shards in merge cursors aggregation stage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31368&quot;&gt;&lt;del&gt;SERVER-31368&lt;/del&gt;&lt;/a&gt; which addresses aggregation.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1194559">SERVER-46446</key>
            <summary>Log time spent waiting for remote operations</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="yoonsoo.kim@mongodb.com">Yoon Soo Kim</assignee>
                                    <reporter username="josef.ahmad@mongodb.com">Josef Ahmad</reporter>
                        <labels>
                            <label>qexec-team</label>
                            <label>query-offsite</label>
                    </labels>
                <created>Thu, 27 Feb 2020 09:08:23 +0000</created>
                <updated>Sun, 29 Oct 2023 22:11:38 +0000</updated>
                            <resolved>Fri, 20 Jan 2023 20:36:41 +0000</resolved>
                                                    <fixVersion>6.3.0-rc0</fixVersion>
                    <fixVersion>6.0.8</fixVersion>
                                    <component>Diagnostics</component>
                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="5514011" author="xgen-internal-githook" created="Tue, 20 Jun 2023 22:29:14 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Yoonsoo Kim&apos;, &apos;email&apos;: &apos;yoonsoo.kim@mongodb.com&apos;, &apos;username&apos;: &apos;yun-soo&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46446&quot; title=&quot;Log time spent waiting for remote operations&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46446&quot;&gt;&lt;del&gt;SERVER-46446&lt;/del&gt;&lt;/a&gt; Log time spent waiting for remote operations&lt;/p&gt;

&lt;p&gt;(cherry picked from commit be3f6ec23c5cbc4e4b7e563d50551fb7e2c7340b)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/7d1f82c39cc2c0d7909cdd47c945e51cdaf348a4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/7d1f82c39cc2c0d7909cdd47c945e51cdaf348a4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5128123" author="xgen-internal-githook" created="Fri, 20 Jan 2023 20:34:35 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Yoonsoo Kim&apos;, &apos;email&apos;: &apos;yoonsoo.kim@mongodb.com&apos;, &apos;username&apos;: &apos;yun-soo&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46446&quot; title=&quot;Log time spent waiting for remote operations&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46446&quot;&gt;&lt;del&gt;SERVER-46446&lt;/del&gt;&lt;/a&gt; Log time spent waiting for remote operations&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/be3f6ec23c5cbc4e4b7e563d50551fb7e2c7340b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/be3f6ec23c5cbc4e4b7e563d50551fb7e2c7340b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5111361" author="bernard.gorman" created="Fri, 13 Jan 2023 11:48:20 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=yoonsoo.kim%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;yoonsoo.kim@mongodb.com&quot;&gt;yoonsoo.kim@mongodb.com&lt;/a&gt;: yes, I think that&apos;s a reasonable approach. I don&apos;t think it will be very diagnostically useful for most non-cursor commands, since they typically involve little or no work on mongoS and any excessive execution time therefore implies a problem on the shards. But there may certainly be cases where it&apos;s helpful, and at the very least this field would allow engineers to confirm at a glance that the remote op is the source of the issue. Fortunately, we decided to give the field the extremely generic name &lt;tt&gt;remoteOpWaitMillis&lt;/tt&gt; in the original patch, so that we could accommodate this approach later &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="5110407" author="JIRAUSER1258488" created="Thu, 12 Jan 2023 22:19:07 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bernard.gorman%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;bernard.gorman@mongodb.com&quot;&gt;bernard.gorman@mongodb.com&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=justin.seyster%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;justin.seyster@mongodb.com&quot;&gt;justin.seyster@mongodb.com&lt;/a&gt;, Sorry for pinging you about an old issue. I&apos;m looking at this ticket and related code and the previous CR.&lt;/p&gt;

&lt;p&gt;I think it would be simpler to log a generic &lt;tt&gt;remoteOpTimeWaitMillis&lt;/tt&gt; for any command which contacts a remote shard using &lt;tt&gt;AsyncRequestsSender&lt;/tt&gt; (Bernard&apos;s alternative solution). My rationales are&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;It would be simple compared to plumbing a flag to record the remote wait time or not and&lt;/li&gt;
	&lt;li&gt;if &lt;tt&gt;remoteOpTimeWaitMillis&lt;/tt&gt; would be negligible for other commands except find if we&apos;re right about other commands&apos; remote wait time. If not, we can find another cases where the remote wait time matters&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;LMK what you think. If we can agree on a solution, I&apos;ll implement it soon.&lt;/p&gt;</comment>
                            <comment id="3003537" author="bernard.gorman" created="Fri, 27 Mar 2020 00:46:59 +0000"  >&lt;p&gt;After some investigation, and consistent with &lt;a href=&quot;https://mongodbcr.appspot.com/434770018/#msg5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the discussion on the original CR here&lt;/a&gt;, there are some complications in doing this for &lt;tt&gt;find&lt;/tt&gt; which means that we can&apos;t get this for free as a result of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31368&quot; title=&quot;Log time spent waiting for other shards in merge cursors aggregation stage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31368&quot;&gt;&lt;del&gt;SERVER-31368&lt;/del&gt;&lt;/a&gt;. In particular, &lt;tt&gt;find&lt;/tt&gt; may retrieve a batch during the initial command, whereas &lt;tt&gt;aggregate&lt;/tt&gt; does no work beyond establishing the cursors until the first &lt;tt&gt;getMore&lt;/tt&gt;; this means that we will need to add instrumentation to the &lt;tt&gt;AsyncRequestsSender&lt;/tt&gt; as well as the &lt;tt&gt;BlockingResultsMerger&lt;/tt&gt;. Additionally, since many non-cursor commands use the &lt;tt&gt;ARS&lt;/tt&gt; , we will need to plumb a parameter down to the &lt;tt&gt;ARS&lt;/tt&gt; to indicate whether or not it should record the remote wait time. Alternatively, we could simply log a generic &lt;tt&gt;remoteOpTimeWaitMillis&lt;/tt&gt; field for any command which contacts a remote shard.&lt;/p&gt;

&lt;p&gt;Moving this to Q2 Quick Wins for further consideration.&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="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="2239179">DOCS-15832</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2237982">SERVER-73120</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="439486">SERVER-31368</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>5.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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23470"><![CDATA[v6.0]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.0]]></customfieldvalue>
    <customfieldvalue key="18953"><![CDATA[v4.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000kpfsuQAA]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 3 Mar 2020 16:50:37 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        33 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_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>This change adds a new optional field, &amp;quot;remoteOpWaitMillis&amp;quot; to the profiler / slow query log lines.  It tells you how much time the node spent waiting for results from other nodes.  By comparing this with the total &amp;quot;durationMillis&amp;quot; you can figure out whether the merger or a shard is to blame for a slow query.&lt;br/&gt;
&lt;br/&gt;
This change basically expands &amp;#39;remoteOpWaitMillis&amp;#39; (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31368&quot; title=&quot;Log time spent waiting for other shards in merge cursors aggregation stage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31368&quot;&gt;&lt;strike&gt;SERVER-31368&lt;/strike&gt;&lt;/a&gt;) to any command that contacts shards such as find command.</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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2578</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, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>bernard.gorman@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>josef.ahmad@mongodb.com</customfieldvalue>
            <customfieldvalue>yoonsoo.kim@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hww8tr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr28v3:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3496">Query 2020-03-23</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_17051" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Teams Impacted</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16943"><![CDATA[Cloud]]></customfieldvalue>
    <customfieldvalue key="16944"><![CDATA[Docs]]></customfieldvalue>
    <customfieldvalue key="16945"><![CDATA[Drivers]]></customfieldvalue>
    <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|hwvv33:</customfieldvalue>

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