<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:21: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>[DRIVERS-430] Test that killCursors really succeeds</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-430</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;In &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32169&quot; title=&quot;A cursor created with a session cannot be killed outside that session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32169&quot;&gt;&lt;del&gt;SERVER-32169&lt;/del&gt;&lt;/a&gt; we noticed that it&apos;s easy to miss bugs in drivers&apos; killCursors implementations. The killCursors command can fail but still report &quot;ok: 1&quot;, listing the cursor ids it failed to kill in the &quot;cursorsAlive&quot; array:&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;   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;&amp;gt; db.runCommand({killCursors: &quot;collection&quot;, cursors: [NumberLong(0)]})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;  ok: 1,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;  cursorsNotFound: [NumberLong(0)],&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;  cursorsKilled: [],&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;  cursorsAlive: []&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;}&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;p&gt;If your driver already includes tests that prove it really can kill a cursor, then you don&apos;t need to do anything. For example, PyMongo can&apos;t always kill a cursor with MongoDB 3.7.x due to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32169&quot; title=&quot;A cursor created with a session cannot be killed outside that session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32169&quot;&gt;&lt;del&gt;SERVER-32169&lt;/del&gt;&lt;/a&gt;, and this was discovered because three of PyMongo&apos;s tests fail with MongoDB 3.7.x. If you driver has tests which fail due to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32169&quot; title=&quot;A cursor created with a session cannot be killed outside that session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32169&quot;&gt;&lt;del&gt;SERVER-32169&lt;/del&gt;&lt;/a&gt; then you may be able to validate this ticket already. Otherwise, here&apos;s a suggested test.&lt;/p&gt;

&lt;p&gt;Write a test in each driver that checks we &lt;b&gt;really&lt;/b&gt; kill a cursor:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;insert 1000 documents into a collection&lt;/li&gt;
	&lt;li&gt;do a &quot;find&quot; on the collection and iterate the cursor past the first document&lt;/li&gt;
	&lt;li&gt;store the cursor id in a variable&lt;/li&gt;
	&lt;li&gt;assert the cursor id is nonzero&lt;/li&gt;
	&lt;li&gt;kill the cursor (explicitly, or by letting it go out of scope, depending on the driver)&lt;/li&gt;
	&lt;li&gt;assert that the driver receives a server reply to &quot;killCursors&quot; with &quot;ok: 1&quot;, an empty &quot;cursorsNotFound&quot; array, an empty &quot;cursorsAlive&quot; array, an empty &quot;cursorsUnknown&quot; array, and a &quot;cursorsKilled&quot; array with one element equal to the cursor id&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Drivers can use Command Monitoring, if they&apos;ve implemented it, to check the server reply.&lt;/p&gt;</description>
                <environment></environment>
        <key id="468484">DRIVERS-430</key>
            <summary>Test that killCursors really succeeds</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="13453" iconUrl="https://jira.mongodb.org/images/icons/status_generic.gif" description="">Implementing</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                            <label>newdriver</label>
                    </labels>
                <created>Tue, 5 Dec 2017 20:54:01 +0000</created>
                <updated>Tue, 2 Mar 2021 17:12:45 +0000</updated>
                                                                                    <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1744209" author="jeff.yemin" created="Wed, 6 Dec 2017 15:51:54 +0000"  >&lt;p&gt;Another test suggestion that doesn&apos;t involve command monitoring:  Do the same setup as suggested in the description, but after killing the cursor manually execute a getMore command on the just-closed cursor and assert that the response is a CursorNotFound error.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="468992">CXX-1479</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="769126">RUST-167</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="468533">CDRIVER-2417</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="468989">CSHARP-2119</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="468994">GODRIVER-144</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="468983">NODE-1214</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="468532">PYTHON-1433</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="468993">PHPC-1056</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="468991">RUBY-1265</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="468751">JAVA-2691</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="468070">SERVER-32169</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="614766">DOCS-12114</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_23952" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Driver Compliance</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<style type='text/css'>
         #scriptField, #scriptField *{
                border: 1px solid black;
            }

            #scriptField{
                border-collapse: collapse;
            }

            #scriptField td {
                text-align: center; /* Center-align text in table cells */
            }

            #scriptField td.key {
                text-align: left; /* Left-align text in the Key column */
            }

            #scriptField a {
                text-decoration: none; /* Remove underlines from links */
                border: none; /* Remove border from links */
            }
            
            /* Add green background color to cells with FixVersion */
            #scriptField td.hasFixVersion {
                background-color: #00FF00; /* Green color code */
            }

            /* Center-align the first row headers */
            #scriptField th {
                text-align: center;
            }
        </style>
<table id='scriptField'>
  <tr>
    <th>Key</th>
    <th>Status/Resolution</th>
    <th>FixVersion</th>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PYTHON-1433'>PYTHON-1433</a>
    </td>
    <td>Works as Designed</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CDRIVER-2417'>CDRIVER-2417</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>1.10.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/JAVA-2691'>JAVA-2691</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>3.6.1</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/NODE-1214'>NODE-1214</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>3.0.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/SCALA-362'>SCALA-362</a>
    </td>
    <td>Won't Fix</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CSHARP-2119'>CSHARP-2119</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.9.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PERL-833'>PERL-833</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.1.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUBY-1265'>RUBY-1265</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.7.0.rc0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CXX-1479'>CXX-1479</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PHPC-1056'>PHPC-1056</a>
    </td>
    <td>Works as Designed</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/GODRIVER-144'>GODRIVER-144</a>
    </td>
    <td>Done</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUST-167'>RUST-167</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/SWIFT-482'>SWIFT-482</a>
    </td>
    <td>Won't Do</td>
    <td class=''></td>
  </tr>
</table>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htd8fj:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>