<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:40:30 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-16265] Add query details to getmore entry in profiler and db.currentOp()</title>
                <link>https://jira.mongodb.org/browse/SERVER-16265</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;It is possible to run aggregation queries with the {cursor:{batchSize:0}} option, in order to quickly get back a cursor that can subsequently be iterated. This approach is documented &lt;a href=&quot;http://docs.mongodb.org/manual/reference/method/db.collection.aggregate/#specify-an-initial-batch-size&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;br/&gt;
The problem with using this option is that it makes debugging slow queries difficult since the database profiler (set to level 1) and &lt;tt&gt;mongod&lt;/tt&gt; logs only record the &apos;getmore&apos; ops on the cursor, since the original query is very fast.&lt;br/&gt;
I think a couple of enhancements are needed :&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;add details of the query to the getmore log entry (which is essential for the above case)&lt;/li&gt;
	&lt;li&gt;add the details of the query to db.currentOp()&lt;/li&gt;
	&lt;li&gt;add the cursorId to the original query log entry (which makes correlating a query and its associated getmores much easier)&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="170639">SERVER-16265</key>
            <summary>Add query details to getmore entry in profiler and db.currentOp()</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="9">Done</resolution>
                                        <assignee username="david.storch@mongodb.com">David Storch</assignee>
                                    <reporter username="jon.rangel@mongodb.com">Jon Rangel</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Nov 2014 12:15:32 +0000</created>
                <updated>Wed, 13 Dec 2017 17:08:30 +0000</updated>
                            <resolved>Wed, 20 May 2015 21:32:13 +0000</resolved>
                                                    <fixVersion>2.6.11</fixVersion>
                    <fixVersion>3.0.4</fixVersion>
                    <fixVersion>3.1.4</fixVersion>
                                    <component>Diagnostics</component>
                    <component>Querying</component>
                                        <votes>4</votes>
                                    <watches>14</watches>
                                                                                                                <comments>
                            <comment id="1388760" author="david.storch" created="Tue, 20 Sep 2016 15:58:05 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=admin%40mixmax.com&quot; class=&quot;user-hover&quot; rel=&quot;admin@mixmax.com&quot;&gt;admin@mixmax.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;The upcoming MongoDB 3.4 release will contain a number of improvements to the diagnostics reported in &lt;tt&gt;system.profile&lt;/tt&gt;, the slow query logs, and &lt;tt&gt;db.currentOp()&lt;/tt&gt;. The umbrella ticket for these changes is &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-17862&quot; title=&quot;Unify stats reporting for log/profiler across CRUD operations&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-17862&quot;&gt;&lt;del&gt;SERVER-17862&lt;/del&gt;&lt;/a&gt;, which summarizes the incorporated fixes.&lt;/p&gt;

&lt;p&gt;Regarding your specific question about getMore, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23260&quot; title=&quot;Report original query with getMore in log, profiler and currentOp&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-23260&quot;&gt;&lt;del&gt;SERVER-23260&lt;/del&gt;&lt;/a&gt; added a field called &lt;tt&gt;originatingCommand&lt;/tt&gt; which should help you trace back from a getMore to the command which created the cursor.&lt;/p&gt;

&lt;p&gt;Best,&lt;br/&gt;
Dave&lt;/p&gt;</comment>
                            <comment id="1388262" author="brad@mixmax.com" created="Tue, 20 Sep 2016 00:39:47 +0000"  >&lt;p&gt;Hi - I see that db.currentOp() now reveals the original query, but the slow query log still only reveals only that it is a `getmore` query:&lt;/p&gt;

&lt;p&gt;{ &quot;op&quot; : &quot;getmore&quot;, &quot;ns&quot; : &quot;app-prod.snippets&quot;, &quot;query&quot; : { &quot;getMore&quot; : &lt;/p&gt;
{ &quot;$numberLong&quot; : &quot;207536363671&quot; }
&lt;p&gt;, &quot;collection&quot; : &quot;snippets&quot;, &quot;batchSize&quot; : &lt;/p&gt;
{ &quot;$numberLong&quot; : &quot;0&quot; }
&lt;p&gt; }, &quot;cursorid&quot; : &lt;/p&gt;
{ &quot;$numberLong&quot; : &quot;207536363671&quot; }
&lt;p&gt;, &quot;cursorExhausted&quot; : true, &quot;keyUpdates&quot; : 0, &quot;writeConflicts&quot; : 0, &quot;numYield&quot; : 697, &quot;locks&quot; : { &quot;Global&quot; : { &quot;acquireCount&quot; : { &quot;r&quot; : &lt;/p&gt;
{ &quot;$numberLong&quot; : &quot;1396&quot; }
&lt;p&gt; } }, &quot;Database&quot; : { &quot;acquireCount&quot; : { &quot;r&quot; : &lt;/p&gt;
{ &quot;$numberLong&quot; : &quot;698&quot; }
&lt;p&gt; } }, &quot;Collection&quot; : { &quot;acquireCount&quot; : { &quot;r&quot; : &lt;/p&gt;
{ &quot;$numberLong&quot; : &quot;698&quot; }
&lt;p&gt; } } }, &quot;nreturned&quot; : 52212, &quot;responseLength&quot; : 3317968, &quot;millis&quot; : 38431, &quot;execStats&quot; : {  }, &quot;ts&quot; : &lt;/p&gt;
{ &quot;$date&quot; : &quot;2016-09-20T00:36:01.962+0000&quot; }
&lt;p&gt;, &quot;client&quot; : &quot;54.197.6.67&quot;, &quot;allUsers&quot; : [ &lt;/p&gt;
{ &quot;user&quot; : &quot;app&quot;, &quot;db&quot; : &quot;admin&quot; }
&lt;p&gt; ], &quot;user&quot; : &quot;app@admin&quot; }&lt;/p&gt;

&lt;p&gt;How can I figure out the original query from the above getmore?&lt;/p&gt;</comment>
                            <comment id="919829" author="xgen-internal-githook" created="Wed, 20 May 2015 22:30:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dstorch&apos;, u&apos;name&apos;: u&apos;David Storch&apos;, u&apos;email&apos;: u&apos;david.storch@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-16265&quot; title=&quot;Add query details to getmore entry in profiler and db.currentOp()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-16265&quot;&gt;&lt;del&gt;SERVER-16265&lt;/del&gt;&lt;/a&gt; add query predicate and aggregation command to the getMore slow query log / profile entries&lt;/p&gt;

&lt;p&gt;(cherry picked from commit d89e58fd340ced9370d1a39a4334a42a77005f5e)&lt;/p&gt;

&lt;p&gt;Conflicts:&lt;br/&gt;
	src/mongo/db/commands/pipeline_command.cpp&lt;br/&gt;
	src/mongo/db/query/find.cpp&lt;br/&gt;
Branch: v2.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3e43c6efd8580ccc155e822d3d37dbc115494bc1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3e43c6efd8580ccc155e822d3d37dbc115494bc1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="919808" author="xgen-internal-githook" created="Wed, 20 May 2015 21:59:58 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dstorch&apos;, u&apos;name&apos;: u&apos;David Storch&apos;, u&apos;email&apos;: u&apos;david.storch@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-16265&quot; title=&quot;Add query details to getmore entry in profiler and db.currentOp()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-16265&quot;&gt;&lt;del&gt;SERVER-16265&lt;/del&gt;&lt;/a&gt; add query predicate and aggregation command to the getMore slow query log / profile entries&lt;/p&gt;

&lt;p&gt;(cherry picked from commit d89e58fd340ced9370d1a39a4334a42a77005f5e)&lt;br/&gt;
Branch: v3.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b4ad028972a125bdf52b775fb1daa42df0359fc1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b4ad028972a125bdf52b775fb1daa42df0359fc1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="919772" author="xgen-internal-githook" created="Wed, 20 May 2015 21:31:05 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dstorch&apos;, u&apos;name&apos;: u&apos;David Storch&apos;, u&apos;email&apos;: u&apos;david.storch@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-16265&quot; title=&quot;Add query details to getmore entry in profiler and db.currentOp()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-16265&quot;&gt;&lt;del&gt;SERVER-16265&lt;/del&gt;&lt;/a&gt; add query predicate and aggregation command to the getMore slow query log / profile entries&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d89e58fd340ced9370d1a39a4334a42a77005f5e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d89e58fd340ced9370d1a39a4334a42a77005f5e&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <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="205751">DOCS-5482</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="178682">SERVER-16847</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="191599">SERVER-17716</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="193721">SERVER-17862</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="23420">SERVER-4045</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_12451" key="com.atlassian.jira.plugin.system.customfieldtypes:multiversion">
                        <customfieldname>Backport Completed</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="15514">2.6.11</customfieldvalue>
    <customfieldvalue id="15419">3.0.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[[500A000000UaYrsIAF]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 8 Apr 2015 20:37:55 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 21 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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 21 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>brad@mixmax.com</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jon.rangel@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrli7z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrf05r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>149336</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="518">Quint Iteration 4</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_11861" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>User Summary</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11856"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjd8f:</customfieldvalue>

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