<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:51:58 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>[JAVA-304] Problem with closing cursors - killCursors</title>
                <link>https://jira.mongodb.org/browse/JAVA-304</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The following group of messages are causing a lot of noise in the mongod logs (it displays over and over).&lt;/p&gt;

&lt;p&gt;I tested the same code with an older version of the driver and it didn&apos;t display these messages in the mongod log.&lt;/p&gt;

&lt;p&gt;------------------------- mongoniff:&lt;/p&gt;

&lt;p&gt;query: &lt;/p&gt;
{ cid: ObjectId(&apos;4d1b6314e528c81a1f200e03&apos;) }
&lt;p&gt;  ntoreturn: 0 ntoskip: 0 127.0.0.1:27017  &amp;lt;&amp;lt;--  127.0.0.1:52976   1766 bytes  id:581d98b8        1478334648 - 3700&lt;/p&gt;

&lt;p&gt;reply n:10 cursorId: 0 &lt;/p&gt;
{ _id: &quot;Rnz4c.local-f65b47db16df8f14d7e5aec03a308614-4d1b6314e528c81a1f200e03&quot;, adr: &quot;0:0:0:0:0:0:0:1%0&quot;, ahn: &quot;Rnz4c.local&quot;, cid: ObjectId(&apos;4d1b6314e528c81a1f200e03&apos;), lu: 1300932926583, p: false, uc: 150 }
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;127.0.0.1:52976  --&amp;gt;&amp;gt; 127.0.0.1:27017   32 bytes  id:e75        3701  killCursors n: 1&lt;/p&gt;

&lt;p&gt;------------------------- mongod log:&lt;/p&gt;

&lt;p&gt;killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:28:58 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:28:59 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:03 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:04 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:08 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:09 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:13 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:14 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:19 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:23 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:24 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:28 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:29 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; killcursors: found 0 of 1&lt;br/&gt;
Wed Mar 23 23:29:33 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn25&amp;#93;&lt;/span&gt; ClientCursor::find(): cursor not found in map 0 (ok after a drop)&lt;/p&gt;</description>
                <environment>Tested on 1.8.0, 1.7.4 and 1.6.5.&lt;br/&gt;
</environment>
        <key id="15256">JAVA-304</key>
            <summary>Problem with closing cursors - killCursors</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="antoine">Antoine Girbal</assignee>
                                    <reporter username="rn@deftlabs.com">Ryan Nitz</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Mar 2011 03:46:16 +0000</created>
                <updated>Wed, 19 Oct 2016 14:17:23 +0000</updated>
                            <resolved>Thu, 24 Mar 2011 16:02:17 +0000</resolved>
                                    <version>2.5</version>
                                    <fixVersion>2.5.2</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="26688" author="scotthernandez" created="Thu, 24 Mar 2011 15:03:28 +0000"  >&lt;p&gt;Antoine, is that it, can we close it? I am going to do a 2.5.2 release for this.&lt;/p&gt;</comment>
                            <comment id="26684" author="antoine" created="Thu, 24 Mar 2011 14:26:57 +0000"  >&lt;p&gt;just pushed a fix for closing id that are negative.&lt;br/&gt;
the condition was not correct in several places (including getMore())&lt;/p&gt;</comment>
                            <comment id="26682" author="auto" created="Thu, 24 Mar 2011 14:24:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-304&quot; title=&quot;Problem with closing cursors - killCursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-304&quot;&gt;&lt;del&gt;JAVA-304&lt;/del&gt;&lt;/a&gt;: cursors with negative id were not being closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/4b7f909a1707ea4803565f1a11f2822f043c87aa&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/4b7f909a1707ea4803565f1a11f2822f043c87aa&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="26676" author="antoine" created="Thu, 24 Mar 2011 14:03:24 +0000"  >&lt;p&gt;the problem here is that in killCursor() driver will kill cursor as long as id &amp;gt;= 0.&lt;br/&gt;
But id of 0 means that cursor does not exists.&lt;br/&gt;
With driver 2.5 it will automatically close cursor when limit is reached, and then if client calls close() it will do another killCursor on id 0.&lt;br/&gt;
fixed by changing condition to be id &amp;gt; 0&lt;/p&gt;</comment>
                            <comment id="26673" author="auto" created="Thu, 24 Mar 2011 14:00:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-304&quot; title=&quot;Problem with closing cursors - killCursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-304&quot;&gt;&lt;del&gt;JAVA-304&lt;/del&gt;&lt;/a&gt;: Problem with closing cursors - killCursor may try to close a cursor of id 0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/8f9b11eed55171e9dc07a9938b1f0f0834192d67&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/8f9b11eed55171e9dc07a9938b1f0f0834192d67&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrhcd3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14803</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>