<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:11 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>[CSHARP-914] Possibility to </title>
                <link>https://jira.mongodb.org/browse/CSHARP-914</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;It&apos;s not possible to cancel executing query. The problem relates to both MongoQueryable and MongoCollection methods. Based on assumption that 3rd party tools can &quot;kill&quot; connection and corresponding query, it would be nice to have methods like Close on MongoCursor, for example.&lt;/p&gt;

&lt;p&gt;The use case is the following:&lt;br/&gt;
Incoming HTTP request is processed and query is executed. But, for example, query takes long time and user closes or refreshes browser. But unfortunately the query still executes and consumes resources. There is no way to reach underlying connection, on which query executes, and close it.&lt;/p&gt;</description>
                <environment></environment>
        <key id="112493">CSHARP-914</key>
            <summary>Possibility to </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="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="-1">Unassigned</assignee>
                                    <reporter username="dnaumov">Dmitry Naumov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Feb 2014 19:40:29 +0000</created>
                <updated>Fri, 21 Nov 2014 13:34:10 +0000</updated>
                            <resolved>Thu, 20 Mar 2014 19:40:27 +0000</resolved>
                                    <version>1.8.3</version>
                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="769904" author="craiggwilson" created="Fri, 21 Nov 2014 13:08:27 +0000"  >&lt;p&gt;You&apos;re welcome to look at our master branch. We are working as fast as we can. &lt;/p&gt;

&lt;p&gt;Just to note, it is virtually impossible to kill an inflight where the server hasn&apos;t yet responded from the driver automatically. Async will release the local resources because while we are waiting for the response, no thread is being used. However, a connection is still checked out even though a thread isn&apos;t currently in use. Killing that connection is a really bad idea. Connections are pooled and are expensive resources to create. So, to simply kill off an expensive resource because you want to free it up doesn&apos;t make a lot of sense.&lt;/p&gt;

&lt;p&gt;Regardless, I&apos;d look at your queries and get them executing in under a second. I can&apos;t think of a good reason why a 30 second query would be acceptable.&lt;/p&gt;</comment>
                            <comment id="769900" author="dnaumov" created="Fri, 21 Nov 2014 12:59:28 +0000"  >&lt;p&gt;Craig,&lt;br/&gt;
is it possible to take part/contribute in development of this feature? It become very urgent for me and the only possible workaround I see is to do reflection-based hacks with QueryOperation and ConnectionProvider...&lt;/p&gt;</comment>
                            <comment id="520273" author="craiggwilson" created="Thu, 20 Mar 2014 19:40:05 +0000"  >&lt;p&gt;Hi Dmitry,&lt;/p&gt;

&lt;p&gt;I understand what you are saying.  The way to accomplish this will be to use the async implementation coming in 3.0, as it will correctly handle dealing connection management in cases like this.  As such, I&apos;m going to close this as Works as Designed and you should watch &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-138&quot; title=&quot;Add asynchronous APIs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-138&quot;&gt;&lt;del&gt;CSHARP-138&lt;/del&gt;&lt;/a&gt; for updates.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                            <comment id="502571" author="dnaumov" created="Thu, 20 Feb 2014 20:13:07 +0000"  >&lt;p&gt;Craig, I&apos;m not very familar with server implementation, but I expect that it correctly handles closing incoming connection. Actually I see this expected behavior when I kill connection using 3rd party tools. I looked into C# driver to find something which connects MongoCursor and underlying connection used for this query, but quickly understood that it is not easy is I hoped. That&apos;s why I have no pull request to offer...&lt;/p&gt;

&lt;p&gt;Of cource $maxTime would be great in some cases, but not in all. Let&apos;s say I have query which usually takes up to N (let&apos;s say 30) seconds to complete and that&apos;s fine. I can set $maxTime for, let&apos;s say, 35 seconds. But when running this query I understand that results are not needed any more (for example because external http connection was closed by user) and this happens on first second of query execution, I don&apos;t want to wait 35 - 1 = 34 seconds more wasting my resources...&lt;/p&gt;</comment>
                            <comment id="502541" author="craiggwilson" created="Thu, 20 Feb 2014 19:47:11 +0000"  >&lt;p&gt;Hi Dmitry, thanks for the request.  I&apos;m going to put down some thoughts for discussion.&lt;/p&gt;

&lt;p&gt;First, server 2.6 and driver 1.9 will be supporting something called $maxTime.  You can see information about it here: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2212&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-2212&lt;/a&gt;&lt;br/&gt;
Second, if we were to do this on the client side, it would force us to either close the connection entirely or keep it open in the background to read what the server is sending us over the wire.  This would require some thought and might not even be possible in all cases...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="14042">CSHARP-138</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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrwacf:</customfieldvalue>

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