<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:27:31 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-31578] Add a query parameter to limit the time an operation runs in the server</title>
                <link>https://jira.mongodb.org/browse/SERVER-31578</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Add a new query parameter, similar to maxTimeMS, with the purpose of limiting how long an operation runs in the database from the moment it reaches the server. Including blocking time and being a hard limit timeout for the operation.&lt;/p&gt;</description>
                <environment></environment>
        <key id="445726">SERVER-31578</key>
            <summary>Add a query parameter to limit the time an operation runs in the server</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="backlog-server-query">Backlog - Query Team</assignee>
                                    <reporter username="conchi.bueno@mongodb.com">Conchi Bueno</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Oct 2017 04:03:08 +0000</created>
                <updated>Tue, 6 Dec 2022 03:49:12 +0000</updated>
                            <resolved>Fri, 20 Oct 2017 14:54:53 +0000</resolved>
                                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="1716151" author="asya" created="Fri, 3 Nov 2017 01:06:02 +0000"  >&lt;p&gt;It sounds like there&apos;s a consensus that this configuration/feature must live on the client/driver level.  Since the SERVER project is to track features in the server, it&apos;s not appropriate to re-open this ticket, but we should open a feature request/tracking ticket in jira - possible DRIVERS project.&lt;/p&gt;

&lt;p&gt;We can link it here for related discussion and context.&lt;/p&gt;</comment>
                            <comment id="1705386" author="nmayakuntla" created="Fri, 20 Oct 2017 23:52:10 +0000"  >&lt;p&gt;Cassandra example : &lt;br/&gt;
session.execute(&lt;br/&gt;
        new SimpleStatement(&quot;TRUNCATE tmp&quot;).setReadTimeoutMillis(100));&lt;/p&gt;
</comment>
                            <comment id="1705102" author="charlie.swanson" created="Fri, 20 Oct 2017 18:37:00 +0000"  >&lt;p&gt;Can you provide an example?&lt;/p&gt;</comment>
                            <comment id="1705095" author="nmayakuntla" created="Fri, 20 Oct 2017 18:29:29 +0000"  >&lt;p&gt;When i said other databases support, i meant they support from client point of view. &lt;/p&gt;</comment>
                            <comment id="1705093" author="charlie.swanson" created="Fri, 20 Oct 2017 18:24:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nmayakuntla&quot; class=&quot;user-hover&quot; rel=&quot;nmayakuntla&quot;&gt;nmayakuntla&lt;/a&gt; In general I don&apos;t see how we or any other database can provide a guarantee that we will return within X milliseconds, since any arbitrary system call or mutex acquisition might stall indefinitely. Additionally, there could be an arbitrary delay in the network returning to your application, so any kind of operation timeout cannot provide a guarantee to the application that it will receive a response within that time frame. This maxTimeMS mechanism was not designed to provide that behavior, and I don&apos;t think it&apos;s really possible to achieve.&lt;/p&gt;

&lt;p&gt;If you&apos;d like we could repurpose this ticket into one whose purpose is to periodically check for interrupt while yielded, which would alleviate the particular scenario described here.&lt;/p&gt;</comment>
                            <comment id="1705012" author="nmayakuntla" created="Fri, 20 Oct 2017 17:37:16 +0000"  >&lt;p&gt;1. Isn&apos;t maxTimeMS not reliable from application point of view. If the time to acquire lock takes say 400 milliseconds where as application has only 200 milliseconds to fetch the data, how would it work from application point of view.&lt;/p&gt;

&lt;p&gt;2. SocketTimeout cannot be an option : In an application where there are several usecases/flows, which means different SLA&apos;s for different queries/flows/usecases, how can socket timeout be used as a way to get reliable response times for different flows. Can you set socket timeout at operation level?&lt;/p&gt;

&lt;p&gt;Couchbase, Memcache, Cassandra supports operation level timeouts and they help improve application resiliency when database or network have issues.&lt;/p&gt;</comment>
                            <comment id="1704759" author="ian@10gen.com" created="Fri, 20 Oct 2017 14:54:53 +0000"  >&lt;p&gt;As Charlie described above, we don&apos;t believe that this is different from the existing maxTimeMS option.&lt;/p&gt;</comment>
                            <comment id="1704758" author="asya" created="Fri, 20 Oct 2017 14:54:45 +0000"  >&lt;p&gt;I wonder if this could be handled on the driver side though - if it were timing a request sent, it could return timeout error to the client knowing eventually the op will be killed?&lt;/p&gt;</comment>
                            <comment id="1699959" author="charlie.swanson" created="Mon, 16 Oct 2017 17:33:48 +0000"  >&lt;p&gt;It looks like the implication is that maxTimeMS does not include time spent waiting for locks. This is not accurate. The timer tracking maxTimeMS does not stop while the operation is yielded or otherwise waiting for locks. However, it is possible an operation can exceed the maxTimeMS because the operation only periodically checks for interrupts. For a query, this most commonly happens while yielding. So the following scenario could happen:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Operation decides it is time to yield.&lt;/li&gt;
	&lt;li&gt;Operation checks for interrupt, is at 150ms with a 200ms maxTimeMS.&lt;/li&gt;
	&lt;li&gt;Operation decides the timeout has not expired, so yields all locks and tries to re-acquire them before proceeding.&lt;/li&gt;
	&lt;li&gt;For some reason it takes 500ms to acquire the locks again.&lt;/li&gt;
	&lt;li&gt;The operation resumes control, maybe does some more work, or maybe immediately checks for interrupt - in either case it will soon realize its maxTimeMS has expired, and return an error to the client, having spent approximately 650ms processing, despite the 200ms &apos;budget&apos;.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;So I think this request is really asking for is to eliminate the behavior of &apos;periodic interrupt checking&apos;, somewhat at the developer&apos;s intuition/discretion, and instead somehow ensure that the operation is killed &apos;exactly&apos; when the deadline hits. I&apos;m not sure how feasible this goal is... Conceivably any thread could be blocked indefinitely, whether waiting for a lock, or waiting for the OS to return from a system call. The above series of events could also happen if some other operation (allocating memory, reading from disk, etc.) stalls for a number of milliseconds, so we&apos;ll never be able to abide by the deadline perfectly. We could potentially make more of an effort to periodically check for interrupts while we are waiting for something that we know might take a while, like acquiring a lock, though I don&apos;t think we could really ever offer a guarantee that we will take no more than X milliseconds and get back to you with a response within that amount of time.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="503221">JAVA-2795</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000YSqjjIAD]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 16 Oct 2017 16:26:20 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 14 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 14 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>conchi.bueno@mongodb.com</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>nmayakuntla</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hthv8f:</customfieldvalue>

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

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