<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:08:16 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>[DOCS-13613] Investigate changes in SERVER-31368: Log time spent waiting for other shards in merge cursors aggregation stage</title>
                <link>https://jira.mongodb.org/browse/DOCS-13613</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;h2&gt;&lt;a name=&quot;Description&quot;&gt;&lt;/a&gt;Description&lt;/h2&gt;

    &lt;div class=&quot;panel&quot; style=&quot;background-color: #c2d2c2;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;background-color: #239eb0;&quot;&gt;&lt;b&gt;Downstream Change Summary&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #c2d2c2;&quot;&gt;
&lt;p&gt;    This change adds a new optional field, &quot;remoteOpWaitMillis&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 &quot;durationMillis&quot; you can figure out whether the merger or a shard is to blame for a slow query.&lt;/p&gt;

&lt;p&gt;It only appears when the command is an aggregate or a getMore on an aggregation cursor.  It only appears on the merging node.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;h2&gt;&lt;a name=&quot;DescriptionofLinkedTicket&quot;&gt;&lt;/a&gt;Description of Linked Ticket&lt;/h2&gt;
&lt;p&gt;    Aggregation queries using $mergeCursors communicate with other shards and therefore can be affected by communication issues or issues on other nodes. In the following example the query ran for a very long time but did not spend any time acquiring locks and did not yield. Possibly it was waiting for a reponse from one or more of the other hosts, but there is no indication of that in the log message. It would be helpful for diagnosis if the slow query report indicated how much time was spent waiting for each host.&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2017-06-23T06:53:15.357+0200 I COMMAND  [conn44] command ... command: aggregate { aggregate: &quot;...&quot;, pipeline: [ { $mergeCursors: [ { host: &quot;...&quot;, ns: &quot;...&quot;, id: 253733414549 }, ...]}, { $group: ... } keysExamined:0 docsExamined:0 numYields:0 nreturned:0 reslen:17527 locks:{ Global: { acquireCount: { r: 6 } }, Database: { acquireCount: { r: 3 } }, Collection: { acquireCount: { r: 2 } } } protocol:op_command 2909221ms&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;



&lt;h2&gt;&lt;a name=&quot;Scopeofchanges&quot;&gt;&lt;/a&gt;Scope of changes&lt;/h2&gt;

&lt;h2&gt;&lt;a name=&quot;ImpacttoOtherDocs&quot;&gt;&lt;/a&gt;Impact to Other Docs&lt;/h2&gt;

&lt;h2&gt;&lt;a name=&quot;MVP%28WorkandDate%29&quot;&gt;&lt;/a&gt;MVP (Work and Date)&lt;/h2&gt;

&lt;h2&gt;&lt;a name=&quot;Resources%28ScopeorDesignDocs%2CInvision%2Cetc.%29&quot;&gt;&lt;/a&gt;Resources (Scope or Design Docs, Invision, etc.)&lt;/h2&gt;
</description>
                <environment></environment>
        <key id="1327457">DOCS-13613</key>
            <summary>Investigate changes in SERVER-31368: Log time spent waiting for other shards in merge cursors aggregation stage</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="jason.price@mongodb.com">Jason Price</assignee>
                                    <reporter username="backlog-server-pm">Backlog - Core Eng Program Management Team</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Apr 2020 21:50:58 +0000</created>
                <updated>Mon, 13 Nov 2023 18:06:07 +0000</updated>
                            <resolved>Tue, 10 Aug 2021 21:12:42 +0000</resolved>
                                                    <fixVersion>4.4.0-rc5</fixVersion>
                    <fixVersion>4.7.0</fixVersion>
                    <fixVersion>4.2.10</fixVersion>
                    <fixVersion>Server_Docs_20231030</fixVersion>
                    <fixVersion>Server_Docs_20231106</fixVersion>
                    <fixVersion>Server_Docs_20231105</fixVersion>
                    <fixVersion>Server_Docs_20231113</fixVersion>
                                    <component>manual</component>
                    <component>Server</component>
                        <due></due>
                            <votes>1</votes>
                                    <watches>4</watches>
                                                                                                                                                            <comments>
                            <comment id="3993474" author="xgen-internal-githook" created="Tue, 10 Aug 2021 20:45:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;jason-price-mongodb&apos;, &apos;email&apos;: &apos;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-13613&quot; title=&quot;Investigate changes in SERVER-31368: Log time spent waiting for other shards in merge cursors aggregation stage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-13613&quot;&gt;&lt;del&gt;DOCS-13613&lt;/del&gt;&lt;/a&gt; log time spent waiting for other shards&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/7967ebda37a592ffb7434715c7dbe67e191f517e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/7967ebda37a592ffb7434715c7dbe67e191f517e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3993283" author="xgen-internal-githook" created="Tue, 10 Aug 2021 19:36:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;jason-price-mongodb&apos;, &apos;email&apos;: &apos;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-13613&quot; title=&quot;Investigate changes in SERVER-31368: Log time spent waiting for other shards in merge cursors aggregation stage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-13613&quot;&gt;&lt;del&gt;DOCS-13613&lt;/del&gt;&lt;/a&gt; Log time spent waiting for shards&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/2d85ff391273d17c08fe6d6475c0a56fe9f8534b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/2d85ff391273d17c08fe6d6475c0a56fe9f8534b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3988287" author="xgen-internal-githook" created="Mon, 9 Aug 2021 14:26:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;jason-price-mongodb&apos;, &apos;email&apos;: &apos;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-13613&quot; title=&quot;Investigate changes in SERVER-31368: Log time spent waiting for other shards in merge cursors aggregation stage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-13613&quot;&gt;&lt;del&gt;DOCS-13613&lt;/del&gt;&lt;/a&gt; Log time spent waiting for shards&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/ddd5cefeb88c89d8356ce2c8147da789a5703627&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/ddd5cefeb88c89d8356ce2c8147da789a5703627&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3772819" author="jeffrey.allen" created="Thu, 13 May 2021 21:24:46 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bhaskarhnarula%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;bhaskarhnarula@gmail.com&quot;&gt;bhaskarhnarula@gmail.com&lt;/a&gt; , this change is reflected in the &lt;a href=&quot;https://docs-mongodbcom-staging.corp.mongodb.com/docs/docsworker-xlarge/DOCSP-16109/release-notes/4.2/#4.2.10---oct-2--2020&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;4.2.10 release notes&lt;/a&gt;. There, you will see an entry stating &quot;&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;: Log time spent waiting for other shards in merge cursors aggregation stage&quot;&lt;/p&gt;

&lt;p&gt;The issue here was caused by upgrading the mongos before upgrading the shards. This procedure explains how to upgrade a sharded cluster to the latest revision of a MongoDB release: &lt;a href=&quot;https://docs.mongodb.com/v4.2/tutorial/upgrade-revision/#upgrade-sharded-clusters.&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/v4.2/tutorial/upgrade-revision/#upgrade-sharded-clusters.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Following these steps in the order they are presented ensures that your deployment does not behave unexpectedly when upgrading minor versions.&lt;/p&gt;</comment>
                            <comment id="3772218" author="JIRAUSER1259981" created="Thu, 13 May 2021 17:33:03 +0000"  >&lt;p&gt;Alright, after a day of digging into this I could understand that from 4.2.13 onwards all requests going out of mongos have&#160;recordRemoteOpWaitTime: true. Since rest of the nodes are lower than 4.2.13 they aren&apos;t able to recognise&#160; this attribute hence erroring out.&#160;&lt;/p&gt;

&lt;p&gt;Next hunt is to figure out a way to disable mongos passing this attribute to shards. Can someone please help me understand why don&apos;t have this available in the release notes of 4.2.13?&#160;&lt;/p&gt;</comment>
                            <comment id="3772027" author="JIRAUSER1259981" created="Thu, 13 May 2021 16:26:48 +0000"  >&lt;p&gt;Team,&lt;/p&gt;

&lt;p&gt;Need quick help regarding the problem below -&lt;/p&gt;

&lt;p&gt;We run a sharded mongo database in production environment. Recently, we deprecated one of the mongos instances and the new instance has spawned up with a latest version of Mongo 4.2.14. Rest of the instances (shards, mongos and configs) are on 4.2.5.&#160;&lt;/p&gt;

&lt;p&gt;Soon after this we started facing a problem to which we can find absolutely no documentation over the web. The problem happens only for the node which has 4.2.14.&lt;/p&gt;

&lt;p&gt;Error -&#160;Command failed with error 40415 (Location40415): &apos;BSON field &apos;$mergeCursors.recordRemoteOpWaitTime&apos; is an unknown field.&apos; on server 10.17.9.84:27017. The full response is {&quot;ok&quot;: 0.0, &quot;errmsg&quot;: &quot;BSON field &apos;$mergeCursors.recordRemoteOpWaitTime&apos; is an unknown field.&quot;, &quot;code&quot;: 40415, &quot;codeName&quot;: &quot;Location40415&quot;, &quot;operationTime&quot;: {&quot;$timestamp&quot;: {&quot;t&quot;: 1620920773, &quot;i&quot;: 1}}, &quot;$clusterTime&quot;: {&quot;clusterTime&quot;: {&quot;$timestamp&quot;: {&quot;t&quot;: 1620920773, &quot;i&quot;: 1}}, &quot;signature&quot;: {&quot;hash&quot;: &lt;/p&gt;
{&quot;$binary&quot;: &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAA=&quot;, &quot;$type&quot;: &quot;00&quot;}
&lt;p&gt;, &quot;keyId&quot;: {&quot;$numberLong&quot;: &quot;0&quot;}}}}&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;We understand this happening owing to a long time taken between communication among shards but it wasn&apos;t the case with the lower version.&lt;/p&gt;

&lt;p&gt;Is there a configuration which we can override? Any leads would be helpful.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                            <outwardlinks description="documents">
                                        <issuelink>
            <issuekey id="439486">SERVER-31368</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                            <subtask id="1847567">DOCS-14726</subtask>
                            <subtask id="1847749">DOCS-14727</subtask>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 13 May 2021 16:26:48 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 26 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_14876" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Docs Reviewer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>joseph.dougherty@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DOCSP-15042</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_14873" key="com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker">
                        <customfieldname>External Reviewer</customfieldname>
                        <customfieldvalues>
                                    <customfieldvalue><![CDATA[david.percy@mongodb.com]]></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>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 26 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-pm</customfieldvalue>
            <customfieldvalue>bhaskarhnarula@gmail.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jason.price@mongodb.com</customfieldvalue>
            <customfieldvalue>jeffrey.allen@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxhex3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hx4tjr:</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="5345">ServerDocs2021: Aug3 - Aug10</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|hxh16f:</customfieldvalue>

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