<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:00:51 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-2672] output of db.currentOp() is messed up</title>
                <link>https://jira.mongodb.org/browse/SERVER-2672</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Sometimes operations have wrong collection names. Take a look.&lt;br/&gt;
First of all, there&apos;s a leading question mark instead of first letter (that should be &apos;p&apos;).&lt;br/&gt;
Apart from that, first entry looks ok.&lt;br/&gt;
Second entry is wrong. This query is one of several that are ran against pravdorub_production.answers collection. Also, it claims to be an &apos;update&apos;, but doesn&apos;t look like one (where&apos;s actual update part of the query?)&lt;br/&gt;
Third entry is also wrong. Answers&apos; _id type is ObjectId, not Integer (vk_users has integer _id).&lt;/p&gt;

&lt;p&gt;I am pretty positive that my code queries appropriate collections.&lt;/p&gt;

&lt;p&gt;Also note that first and third queries are the same, only collection name is different. &lt;/p&gt;

&lt;p&gt;		{&lt;br/&gt;
			&quot;opid&quot; : &quot;moscow:1562954&quot;,&lt;br/&gt;
			&quot;active&quot; : false,&lt;br/&gt;
			&quot;lockType&quot; : &quot;read&quot;,&lt;br/&gt;
			&quot;waitingForLock&quot; : true,&lt;br/&gt;
			&quot;op&quot; : &quot;query&quot;,&lt;br/&gt;
			&quot;ns&quot; : &quot;?ravdorub_production.vk_users&quot;,&lt;br/&gt;
			&quot;query&quot; : &lt;/p&gt;
{
				&quot;_id&quot; : 13871986
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;client&quot; : &quot;10.0.0.6:42150&quot;,&lt;br/&gt;
			&quot;desc&quot; : &quot;conn&quot;&lt;br/&gt;
		},&lt;br/&gt;
		{&lt;br/&gt;
			&quot;opid&quot; : &quot;moscow:1562963&quot;,&lt;br/&gt;
			&quot;active&quot; : false,&lt;br/&gt;
			&quot;lockType&quot; : &quot;write&quot;,&lt;br/&gt;
			&quot;waitingForLock&quot; : true,&lt;br/&gt;
			&quot;op&quot; : &quot;update&quot;,&lt;br/&gt;
			&quot;ns&quot; : &quot;?ravdorub_production.vk_users&quot;,&lt;br/&gt;
			&quot;query&quot; : {&lt;br/&gt;
				&quot;_id&quot; : ObjectId(&quot;4d6ebda99b3b49619400014d&quot;),&lt;br/&gt;
				&quot;uiq&quot; : &lt;/p&gt;
{
					&quot;$in&quot; : [
						96474834,
						&quot;96474834&quot;
					]
				}
&lt;p&gt;			},&lt;br/&gt;
			&quot;client&quot; : &quot;10.0.0.6:42157&quot;,&lt;br/&gt;
			&quot;desc&quot; : &quot;conn&quot;&lt;br/&gt;
		},&lt;br/&gt;
		{&lt;br/&gt;
			&quot;opid&quot; : &quot;moscow:1562955&quot;,&lt;br/&gt;
			&quot;active&quot; : false,&lt;br/&gt;
			&quot;lockType&quot; : &quot;read&quot;,&lt;br/&gt;
			&quot;waitingForLock&quot; : true,&lt;br/&gt;
			&quot;op&quot; : &quot;query&quot;,&lt;br/&gt;
			&quot;ns&quot; : &quot;?ravdorub_production.answers&quot;,&lt;br/&gt;
			&quot;query&quot; : &lt;/p&gt;
{
				&quot;_id&quot; : 13871986
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;client&quot; : &quot;10.0.0.6:42174&quot;,&lt;br/&gt;
			&quot;desc&quot; : &quot;conn&quot;&lt;br/&gt;
		},&lt;/p&gt;</description>
                <environment></environment>
        <key id="14973">SERVER-2672</key>
            <summary>output of db.currentOp() is messed up</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="5">Cannot Reproduce</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="sergei.tulentsev@gmail.com">Sergei Tulentsev</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Mar 2011 06:08:26 +0000</created>
                <updated>Tue, 16 Nov 2021 15:37:18 +0000</updated>
                            <resolved>Fri, 4 Mar 2011 08:29:37 +0000</resolved>
                                    <version>1.6.5</version>
                                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="60436" author="eliot" created="Fri, 14 Oct 2011 03:33:52 +0000"  >&lt;p&gt;When the ? mark is there the namespace isn&apos;t meant to be accurate, it could be outdated.&lt;br/&gt;
This was an old debugging tool that has been removed in 2.0, now it&apos;ll just be blank when not relevant.&lt;/p&gt;</comment>
                            <comment id="60315" author="eliwjones" created="Thu, 13 Oct 2011 18:05:51 +0000"  >&lt;p&gt;I can also verify that this is an issue on 1.8.3.&lt;/p&gt;

&lt;p&gt;db.currentOp() will sometimes display the wrong ns.&lt;/p&gt;

&lt;p&gt;an op will show something like this:&lt;/p&gt;

&lt;p&gt;		{&lt;br/&gt;
			&quot;opid&quot; : 1212121212121,&lt;br/&gt;
			&quot;active&quot; : false,&lt;br/&gt;
			&quot;lockType&quot; : &quot;write&quot;,&lt;br/&gt;
			&quot;waitingForLock&quot; : true,&lt;br/&gt;
			&quot;op&quot; : &quot;update&quot;,&lt;br/&gt;
			&quot;ns&quot; : &quot;?ydbname.mycoll.1211&quot;,&lt;br/&gt;
			&quot;query&quot; : &lt;/p&gt;
{
				&quot;some_id&quot; : 3333,
				&quot;email&quot; : &quot;test@email.com&quot;
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;client&quot; : &quot;12.12.12.12:38271&quot;,&lt;br/&gt;
			&quot;desc&quot; : &quot;conn&quot;&lt;br/&gt;
		}&lt;/p&gt;

&lt;p&gt;where db = &apos;mydbname&apos; and the collection name = &apos;mycoll.1211&apos;&lt;/p&gt;

&lt;p&gt;BUT, that op is actually running against the collection name = &apos;mycoll&apos;&lt;/p&gt;

&lt;p&gt;I know this because the &apos;some_id&apos; value in the query is used to route the update to the correct collection.  Certain &apos;some_id&apos; values have their own specially defined collection.. while the bulk of them just exist in the &apos;mycoll&apos; collection.&lt;/p&gt;

&lt;p&gt;I tripled checked this because.. as you can imagine.. I freaked the hell out when I saw that in the currentOp() output.. it would mean all of my updates were randomly going to the wrong collection.  So, I put in specific code to verify that the ultimate collection I was sending an update to was the actual collection that I expected.. and I verified that no weird updates were going to these wrongly shown collections.&lt;/p&gt;

&lt;p&gt;I have not received a single notification of a mis-routed update.&lt;/p&gt;

&lt;p&gt;Like Michael mentioned, I was able to easily notice this because we had a brief span of time yesterday when our active dataset wash pushed out of RAM.. so I was examining all of the piling up ops.  And, it was trivial to see the seeming mis-routed updates since.. an update routed to &quot;mycoll.1111&quot; would have a query with the &apos;some_id&apos; property removed.&lt;/p&gt;

&lt;p&gt;I&apos;d say, if you created 10 processes that scattered updates across two collections with similar names.. but one with a &quot;.somethingelse&quot; at the end.. on a mongodb with not enough ram to hold the dataset.. you should see it fairly easily.&lt;/p&gt;</comment>
                            <comment id="59382" author="schmichael" created="Mon, 10 Oct 2011 01:41:00 +0000"  >&lt;p&gt;I&apos;ve seen this on MongoDB 1.8.1 but only when the server is under heavy load (75% lock, thousands of queries/updates per second).&lt;/p&gt;

&lt;p&gt;I&apos;m afraid I don&apos;t have the time to spend to build a test case capable of reproducing these circumstances.&lt;/p&gt;</comment>
                            <comment id="35572" author="eliot" created="Wed, 1 Jun 2011 15:38:33 +0000"  >&lt;p&gt;Can you provide an example or a reproducible case?&lt;/p&gt;</comment>
                            <comment id="35519" author="aleksi" created="Wed, 1 Jun 2011 11:41:10 +0000"  >&lt;p&gt;Same issue with collection name happens in Graylog2. For updates Mongo 1.8.1 sometimes reports ns as graylog2.messages (we write there heavy), while it should be server_values. Looks like a race. Please re-open this ticket.&lt;/p&gt;</comment>
                            <comment id="27745" author="eliot" created="Mon, 4 Apr 2011 20:41:53 +0000"  >&lt;p&gt;If you are seeing an issue, can you post the output or something we can look at&lt;/p&gt;</comment>
                            <comment id="27676" author="stask" created="Mon, 4 Apr 2011 15:29:22 +0000"  >&lt;p&gt;We&apos;re seeing similar issue with version 1.8.1-rc1. Regular (not sharded) setup. When we run just one thread that executes queries, the db.currentOp() output is correct. But if we run more than one thread, the collection names are mixed up.&lt;br/&gt;
It&apos;s seems that the issue is just in the currentOp() output. The queries are executed on correct collections.&lt;/p&gt;</comment>
                            <comment id="25256" author="sergei.tulentsev@gmail.com" created="Fri, 4 Mar 2011 18:17:30 +0000"  >&lt;p&gt;Collection name. Mongos is asked to look in answers, but the command specifies vk_users.&lt;/p&gt;</comment>
                            <comment id="25255" author="eliot" created="Fri, 4 Mar 2011 18:11:16 +0000"  >&lt;p&gt;What looks wrong to you?&lt;/p&gt;</comment>
                            <comment id="25254" author="sergei.tulentsev@gmail.com" created="Fri, 4 Mar 2011 18:09:06 +0000"  >&lt;p&gt;Here&apos;s proof.&lt;/p&gt;

&lt;p&gt;Correct query came to mongos:&lt;br/&gt;
Fri Mar  4 21:04:21 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn149&amp;#93;&lt;/span&gt; Request::process ns: pravdorub_production.answers msg id:267 attempt: 0&lt;br/&gt;
Fri Mar  4 21:04:21 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn149&amp;#93;&lt;/span&gt; shard query: pravdorub_production.answers  { $query: { hdn: &lt;/p&gt;
{ $ne: 1 }
&lt;p&gt;, uiq: &lt;/p&gt;
{ $in: [ &quot;122197136&quot;, 122197136 ] }
&lt;p&gt;, res: &lt;/p&gt;
{ $in: [ 1, -1, 10 ] }
&lt;p&gt; }, $orderby: &lt;/p&gt;
{ _id: -1 }
&lt;p&gt; }&lt;/p&gt;


&lt;p&gt;And here&apos;s what we have in current ops&lt;br/&gt;
&lt;a href=&quot;http://pastebin.com/cUpptR5M&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://pastebin.com/cUpptR5M&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="25207" author="eliot" created="Fri, 4 Mar 2011 08:29:37 +0000"  >&lt;p&gt;I would check your code carefully.&lt;/p&gt;

&lt;p&gt;The ? is there on purpose.&lt;br/&gt;
Once something is finished, it puts that there to prevent corruption.&lt;/p&gt;

&lt;p&gt;We don&apos;t put the actual update in the display because that is often very large.&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>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 4 Mar 2011 08:29:37 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 18 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_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>
                            12 years, 18 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>aleksi</customfieldvalue>
            <customfieldvalue>eliwjones</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>schmichael</customfieldvalue>
            <customfieldvalue>sergei.tulentsev@gmail.com</customfieldvalue>
            <customfieldvalue>stask</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjwy7:</customfieldvalue>

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

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

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