<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:51:03 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-19464] $sort stage in aggregation doesn&apos;t call scoped connections done ()</title>
                <link>https://jira.mongodb.org/browse/SERVER-19464</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The sort stage doesn&apos;t properly close the connection.  This causes it to be marked as bad and not returned to the pool which leads to many log lines and connection churn.  Potentially gigs per hour of log lines on a small cluster.&lt;/p&gt;</description>
                <environment></environment>
        <key id="217327">SERVER-19464</key>
            <summary>$sort stage in aggregation doesn&apos;t call scoped connections done ()</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="charlie.page@10gen.com">Charlie Page</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Jul 2015 23:15:44 +0000</created>
                <updated>Fri, 5 Jan 2018 04:33:46 +0000</updated>
                            <resolved>Fri, 24 Jul 2015 22:16:48 +0000</resolved>
                                    <version>2.6.10</version>
                                    <fixVersion>2.6.11</fixVersion>
                    <fixVersion>3.0.6</fixVersion>
                    <fixVersion>3.1.7</fixVersion>
                                    <component>Aggregation Framework</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="999897" author="xgen-internal-githook" created="Fri, 7 Aug 2015 22:28:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19464&quot; title=&quot;$sort stage in aggregation doesn&amp;#39;t call scoped connections done ()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19464&quot;&gt;&lt;del&gt;SERVER-19464&lt;/del&gt;&lt;/a&gt; Have DSMergeCursors correctly cleanup _cursors in dispose()&lt;/p&gt;

&lt;p&gt;This involves killing the cursor and returning the connection to the pool.&lt;br/&gt;
This commit also ensures that DSSort calls dispose on its source as needed.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 5c20356061c19b7343cb9aab7398238581f0b600)&lt;br/&gt;
Branch: v3.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/cefd1536c84d05b71b7d9701bb44ea6d47ee8b3c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/cefd1536c84d05b71b7d9701bb44ea6d47ee8b3c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="999896" author="xgen-internal-githook" created="Fri, 7 Aug 2015 22:28:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19464&quot; title=&quot;$sort stage in aggregation doesn&amp;#39;t call scoped connections done ()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19464&quot;&gt;&lt;del&gt;SERVER-19464&lt;/del&gt;&lt;/a&gt; Add a way to explicitly kill a DBClientCursor before destruction&lt;/p&gt;

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

&lt;p&gt;Conflicts:&lt;br/&gt;
	src/mongo/client/dbclientcursor.h&lt;br/&gt;
Branch: v3.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ade79fbb0f2e8843177c9ee2c75c2ef7cdf82db6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ade79fbb0f2e8843177c9ee2c75c2ef7cdf82db6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="992235" author="xgen-internal-githook" created="Wed, 29 Jul 2015 19:49:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19464&quot; title=&quot;$sort stage in aggregation doesn&amp;#39;t call scoped connections done ()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19464&quot;&gt;&lt;del&gt;SERVER-19464&lt;/del&gt;&lt;/a&gt; Have DSMergeCursors correctly cleanup _cursors in dispose()&lt;/p&gt;

&lt;p&gt;This involves killing the cursor and returning the connection to the pool.&lt;br/&gt;
This commit also ensures that DSSort calls dispose on its source as needed.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 5c20356061c19b7343cb9aab7398238581f0b600)&lt;br/&gt;
Branch: v2.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/aace5734271b3563ca883c39c0ea37f2e111f8cb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/aace5734271b3563ca883c39c0ea37f2e111f8cb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="992234" author="xgen-internal-githook" created="Wed, 29 Jul 2015 19:49:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19464&quot; title=&quot;$sort stage in aggregation doesn&amp;#39;t call scoped connections done ()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19464&quot;&gt;&lt;del&gt;SERVER-19464&lt;/del&gt;&lt;/a&gt; Add a way to explicitly kill a DBClientCursor before destruction&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 0476dec3ae310f768ae7fd31418a4c8aa7c24506)&lt;br/&gt;
Branch: v2.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bd585fa7ac8fb51df967116e360f5fc0e8b97596&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bd585fa7ac8fb51df967116e360f5fc0e8b97596&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="991081" author="xgen-internal-githook" created="Tue, 28 Jul 2015 18:46:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19464&quot; title=&quot;$sort stage in aggregation doesn&amp;#39;t call scoped connections done ()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19464&quot;&gt;&lt;del&gt;SERVER-19464&lt;/del&gt;&lt;/a&gt; Have DSMergeCursors correctly cleanup _cursors in dispose()&lt;/p&gt;

&lt;p&gt;This involves killing the cursor and returning the connection to the pool.&lt;br/&gt;
This commit also ensures that DSSort calls dispose on its source as needed.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/5c20356061c19b7343cb9aab7398238581f0b600&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/5c20356061c19b7343cb9aab7398238581f0b600&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="991080" author="xgen-internal-githook" created="Tue, 28 Jul 2015 18:46:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19464&quot; title=&quot;$sort stage in aggregation doesn&amp;#39;t call scoped connections done ()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19464&quot;&gt;&lt;del&gt;SERVER-19464&lt;/del&gt;&lt;/a&gt; Add a way to explicitly kill a DBClientCursor before destruction&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/0476dec3ae310f768ae7fd31418a4c8aa7c24506&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/0476dec3ae310f768ae7fd31418a4c8aa7c24506&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="988697" author="xgen-internal-githook" created="Fri, 24 Jul 2015 21:21:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19464&quot; title=&quot;$sort stage in aggregation doesn&amp;#39;t call scoped connections done ()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19464&quot;&gt;&lt;del&gt;SERVER-19464&lt;/del&gt;&lt;/a&gt; Have DSMergeCursors correctly cleanup _cursors in dispose()&lt;/p&gt;

&lt;p&gt;This involves killing the cursor and returning the connection to the pool.&lt;br/&gt;
This commit also ensures that DSSort calls dispose on its source as needed.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/5c20356061c19b7343cb9aab7398238581f0b600&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/5c20356061c19b7343cb9aab7398238581f0b600&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="988696" author="xgen-internal-githook" created="Fri, 24 Jul 2015 21:21:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19464&quot; title=&quot;$sort stage in aggregation doesn&amp;#39;t call scoped connections done ()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19464&quot;&gt;&lt;del&gt;SERVER-19464&lt;/del&gt;&lt;/a&gt; Add a way to explicitly kill a DBClientCursor before destruction&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/0476dec3ae310f768ae7fd31418a4c8aa7c24506&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/0476dec3ae310f768ae7fd31418a4c8aa7c24506&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="222407">SERVER-19553</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.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="15589">3.0.6</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[[500A000000UaXAUIA3]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 20 Jul 2015 21:59:17 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 27 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-19553'>SERVER-19553</a></s>]]></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>
                            8 years, 27 weeks, 5 days ago
                        </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>charlie.page@10gen.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrl0a7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsb9br:</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>
                                                                                            <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="635">Quint Iteration 7</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;sh.enableSharding(&quot;test&quot;)&lt;br/&gt;
sh.shardCollection(&quot;test.shard&quot;, &lt;/p&gt;
{ _id : &quot;hashed&quot; }
&lt;p&gt;)&lt;br/&gt;
db.shard.aggregate({$match:{ a:1 }}, {$sort: {_id:1}}, {$group:{_id:&quot;$a&quot;}})&lt;br/&gt;
Check the logs of the database&apos;s primary shard for scoped connections being dropped.&lt;/p&gt;</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrj70f:</customfieldvalue>

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