<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:08:14 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>[CDRIVER-25] Way to set operation timeout.</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-25</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;Hello there,&lt;/p&gt;

&lt;p&gt;When doing MongoDB tests, I found out that if there is no response from MongoDB for some reason to a query, request get stuck there for  the unknown timing.&lt;br/&gt;
I am  using MongoDB&apos;s &apos;C&apos; driver to handle HTTP requests and here need is that user should get response within second( rather milliseconds).&lt;/p&gt;

&lt;p&gt;When HTTP request comes for any CRUD(create, insert, update, Delete) operation, there should be a way to specify a timeout period for a request, so that if there is any error like network issue etc.  and request is taking more time than the req_timeout_period, then request should not get stuck there and should return  error something like &quot;MongoDB request timed out&quot;.&lt;/p&gt;

&lt;p&gt;It helps me to respond to HTTP request within desired time window. If HTTP request is just waiting for MongoDB to respond, web page @ the user (browser) will be in loading state for that much time. If this handled by the  &apos;C&apos; driver in appropriate way, then I will be able to respond to HTTP_Request in appropriate manner. &lt;/p&gt;

&lt;p&gt;The way I want it is something like this:&lt;/p&gt;

&lt;p&gt;set_req_timeout(int in_sec);&lt;br/&gt;
OR&lt;br/&gt;
set_req_timeout(int in_milli_sec);&lt;/p&gt;


&lt;p&gt;// operation request send to MongoDB&lt;br/&gt;
TRY {&lt;br/&gt;
        send( operation, massage );&lt;br/&gt;
}&lt;br/&gt;
CATCH ( MongoDB_Req_TimeOut ) {&lt;br/&gt;
        cancel request to MongoDB;          // so that this request wont keep trying for response anymore&lt;br/&gt;
        return MongoDB_Req_TimeOut;&lt;br/&gt;
}&lt;/p&gt;
</description>
                <environment>OS: Linux, 32 and 64 bit.</environment>
        <key id="13693">CDRIVER-25</key>
            <summary>Way to set operation timeout.</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="kbanker">Kyle Banker</assignee>
                                    <reporter username="dilip">Dilip Vaidya</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Nov 2010 06:25:12 +0000</created>
                <updated>Wed, 19 Oct 2016 22:33:29 +0000</updated>
                            <resolved>Thu, 7 Jul 2011 19:22:41 +0000</resolved>
                                                    <fixVersion>0.4</fixVersion>
                                                        <votes>7</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="41179" author="auto" created="Thu, 7 Jul 2011 19:22:23 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;banker&apos;, u&apos;name&apos;: u&apos;Kyle Banker&apos;, u&apos;email&apos;: u&apos;kylebanker@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-25&quot; title=&quot;Way to set operation timeout.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-25&quot;&gt;&lt;del&gt;CDRIVER-25&lt;/del&gt;&lt;/a&gt; added test for timeouts&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/5ef4012866cb4bc01a4cad4fb1cbf323441e619f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/5ef4012866cb4bc01a4cad4fb1cbf323441e619f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="41175" author="auto" created="Thu, 7 Jul 2011 19:22:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;banker&apos;, u&apos;name&apos;: u&apos;Kyle Banker&apos;, u&apos;email&apos;: u&apos;kylebanker@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-25&quot; title=&quot;Way to set operation timeout.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-25&quot;&gt;&lt;del&gt;CDRIVER-25&lt;/del&gt;&lt;/a&gt; test operation timeout&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/c1afbb69dd1a1aceca7851a71368d49520c7d4a2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/c1afbb69dd1a1aceca7851a71368d49520c7d4a2&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|hrh70f:</customfieldvalue>

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