<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:10 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-1134] Increments due to running admin commands</title>
                <link>https://jira.mongodb.org/browse/SERVER-1134</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When running db._adminCommand(&apos;top&apos;) it seems that the values that get sent back are effected by the command. Meaning, I could have 10 queries on a particular collection before running the top command, however after running the top command it jumps up a large amount (have not tested for the exact amount) to something like 120 queries.&lt;/p&gt;

&lt;p&gt;I spoke with Kyle regarding this and he asked me to open an issue since it may be a bug. We are trying to figure out what and how many times a collection is &apos;touched&apos; when top is run on the server.&lt;/p&gt;</description>
                <environment></environment>
        <key id="11985">SERVER-1134</key>
            <summary>Increments due to running admin commands</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="jstad">Justin Smestad</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 May 2010 21:33:45 +0000</created>
                <updated>Tue, 12 Jul 2016 00:27:19 +0000</updated>
                            <resolved>Wed, 26 May 2010 01:55:46 +0000</resolved>
                                    <version>1.4.2</version>
                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="14450" author="eliot" created="Wed, 26 May 2010 01:55:13 +0000"  >&lt;p&gt;$cmd is all db commands, including top itself.&lt;/p&gt;

&lt;p&gt;you may want to remove that from your counts&lt;/p&gt;</comment>
                            <comment id="14341" author="psadauskas" created="Thu, 20 May 2010 00:48:14 +0000"  >&lt;p&gt;I&apos;m trying to get some more information about this. I&apos;m pretty sure its just a misunderstanding on our end, but I&apos;m having trouble finding docs on what the top command returns. Here&apos;s what I&apos;ve collected:&lt;/p&gt;

&lt;p&gt;&amp;gt; use mongo_stats&lt;br/&gt;
switched to db mongo_stats&lt;br/&gt;
&amp;gt; show collections&lt;br/&gt;
log&lt;br/&gt;
raw&lt;br/&gt;
system.indexes&lt;br/&gt;
system.users&lt;br/&gt;
&amp;gt; use admin&lt;br/&gt;
&amp;gt; db.runCommand(&lt;/p&gt;
{top: true}
&lt;p&gt;).totals&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;mongo_stats.raw&amp;quot;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;queries&amp;quot;&amp;#93;&lt;/span&gt;           &lt;/p&gt;
{ &quot;time&quot; : 18873, &quot;count&quot; : 4 }
&lt;p&gt;&amp;gt; db.runCommand(&lt;/p&gt;
{top: true}
&lt;p&gt;).totals&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;mongo_stats.log&amp;quot;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;queries&amp;quot;&amp;#93;&lt;/span&gt;&lt;/p&gt;
{ &quot;time&quot; : 0, &quot;count&quot; : 0 }
&lt;p&gt;&amp;gt; db.runCommand(&lt;/p&gt;
{top: true}
&lt;p&gt;).totals&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;mongo_stats.system.users&amp;quot;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;queries&amp;quot;&amp;#93;&lt;/span&gt;&lt;/p&gt;
{ &quot;time&quot; : 1638, &quot;count&quot; : 20 }
&lt;p&gt;&amp;gt; db.runCommand(&lt;/p&gt;
{top: true}
&lt;p&gt;).totals&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;mongo_stats.$cmd&amp;quot;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;queries&amp;quot;&amp;#93;&lt;/span&gt;        &lt;/p&gt;
{ &quot;time&quot; : 49880, &quot;count&quot; : 43 }
&lt;p&gt;&amp;gt; db.runCommand(&lt;/p&gt;
{top: true}
&lt;p&gt;).totals&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;mongo_stats&amp;quot;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;queries&amp;quot;&amp;#93;&lt;/span&gt;     &lt;/p&gt;
{ &quot;time&quot; : 9790, &quot;count&quot; : 21 }

&lt;p&gt;( &lt;a href=&quot;http://gist.github.com/407198&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://gist.github.com/407198&lt;/a&gt; if the formatting blows up)&lt;/p&gt;

&lt;p&gt;What is the $cmd &quot;collection&quot;, and what is the last one, with no collection? What commands increment the counters for those stats?&lt;/p&gt;

&lt;p&gt;The original issue is incorrectly defined, thats not the behavior we&apos;re seeing. I&apos;ve written a script that runs as a cronjob, which takes every entry in runCommand(&lt;/p&gt;
{top: true}
&lt;p&gt;)&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;totals&amp;quot;&amp;#93;&lt;/span&gt; and inserts it into a separate db. The cron job runs every 2 minutes, and we have &lt;sub&gt;150 entries in the result of top. However, over the last 3 days, it has done nearly 2 _B_illion requests on that database. I would expect something closer to ( 30 runs/hr * 24h * 3d * 150 results =&lt;/sub&gt; 300,000 inserts)&lt;/p&gt;

&lt;p&gt;Here&apos;s the client debug log file of a single run: &lt;a href=&quot;https://gist.github.com/db1e5cfd85ec6efd4d07&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/db1e5cfd85ec6efd4d07&lt;/a&gt; .  &lt;br/&gt;
$ cat statdumper.log  | grep insert | wc -l&lt;br/&gt;
155&lt;/p&gt;

&lt;p&gt;In this screenshot, you can see the results from top: &lt;a href=&quot;http://skitch.com/theamazingrando/drmac/hosted-mongodb-from-mongo-machine&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://skitch.com/theamazingrando/drmac/hosted-mongodb-from-mongo-machine&lt;/a&gt;&lt;br/&gt;
The $cmd entry that top reports is not in here, but it does get included in my total, and you can see that there&apos;s about 200,000 &quot;queries&quot;  to the $cmd database. I&apos;m not sure where the removes come from, the script doesn&apos;t do any removes.&lt;/p&gt;

&lt;p&gt;I guess my biggest question is: What exactly does top report?&lt;/p&gt;</comment>
                            <comment id="14324" author="eliot" created="Wed, 19 May 2010 09:40:18 +0000"  >&lt;p&gt;can you provide an example?&lt;br/&gt;
we use that a lot and have never seen any such behavior&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 19 May 2010 09:40:18 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 39 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_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 39 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>jstad</customfieldvalue>
            <customfieldvalue>psadauskas</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpmc7:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>22762</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_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|ht0ixz:</customfieldvalue>

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