<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:39:05 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-15815] maxTimeMS on initial tailable cursor query and getMore.</title>
                <link>https://jira.mongodb.org/browse/SERVER-15815</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;I ran into an issue (&lt;a href=&quot;https://jira.mongodb.org/browse/PYTHON-780&quot; title=&quot;ExecutionTimeout behaviour not as advertised.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PYTHON-780&quot;&gt;&lt;del&gt;PYTHON-780&lt;/del&gt;&lt;/a&gt;) with deviation from expected cursor timeout behaviour (defined by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2212&quot; title=&quot;Server automatically abort queries/commands after user-specified time limit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2212&quot;&gt;&lt;del&gt;SERVER-2212&lt;/del&gt;&lt;/a&gt;); if &lt;tt&gt;await_data=True&lt;/tt&gt; then &lt;tt&gt;maxTimeMS&lt;/tt&gt; is ignored.  This is effectively undocumented (unspecified in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2212&quot; title=&quot;Server automatically abort queries/commands after user-specified time limit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2212&quot;&gt;&lt;del&gt;SERVER-2212&lt;/del&gt;&lt;/a&gt;) where I assumed the following behaviour would be correct:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;A query that completes in under its time limit will &quot;roll over&quot; its remaining time to the first getmore op (which will then &quot;roll over&quot; its remaining time to the second getmore op and so on, until the time limit is hit).&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Without the ability to have controllable timeouts on the operation of tailing cursors I am forced to resort to polling behaviour to implement the timeout myself in Python.  This is not a good solution for a wide variety of reasons, least of all for efficiency and added latency.&lt;/p&gt;

&lt;p&gt;Use case: awaiting messages from distributed RPC calls over a capped collection used as a message bus.  A specific example from my codebase is &lt;tt&gt;task.result(timeout=None)&lt;/tt&gt; &#8212; return the result of the RPC call, waiting up to &lt;tt&gt;timeout&lt;/tt&gt; seconds for it.  (Indefinitely if unspecified.)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/PYTHON-780&quot; title=&quot;ExecutionTimeout behaviour not as advertised.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PYTHON-780&quot;&gt;&lt;del&gt;PYTHON-780&lt;/del&gt;&lt;/a&gt; contains a minimal test case whose behaviour was expected to match the &lt;tt&gt;test_max_time_ms&lt;/tt&gt; tests.  (That is, raising of &lt;tt&gt;ExecutionTimeout&lt;/tt&gt; vs. the current behaviour of silently finishing iteration.)  Error code 50 is never returned over the wire protocol in this situation, as far as I can tell, thus never triggering this exception in PyMongo&apos;s &lt;tt&gt;_unpack_response&lt;/tt&gt; code.&lt;/p&gt;</description>
                <environment></environment>
        <key id="165700">SERVER-15815</key>
            <summary>maxTimeMS on initial tailable cursor query and getMore.</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="3">Duplicate</resolution>
                                        <assignee username="david.storch@mongodb.com">David Storch</assignee>
                                    <reporter username="alice@gothcandy.com">Dissatisfied Former User</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 Oct 2014 18:11:02 +0000</created>
                <updated>Thu, 6 Apr 2023 15:39:09 +0000</updated>
                            <resolved>Tue, 2 Feb 2016 17:23:05 +0000</resolved>
                                    <version>2.6.5</version>
                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="1161264" author="david.storch" created="Tue, 2 Feb 2016 17:22:47 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alice%40gothcandy.com&quot; class=&quot;user-hover&quot; rel=&quot;alice@gothcandy.com&quot;&gt;alice@gothcandy.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Again, apologies for our delayed response. I believe that MongoDB version 3.2 adds the behavior that you are looking for. In version 3.2, we added new database commands for performing find and getMore operations (see SERVER-15176 for more detail on this). As part of this work, the new getMore command accepts a parameter called &lt;tt&gt;maxTimeMS&lt;/tt&gt; which is legal only for awaitData cursors over capped collections. The getMore command is &lt;a href=&quot;https://docs.mongodb.org/manual/reference/command/getMore/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;documented here&lt;/a&gt;; in particular, see the documentation for the &lt;tt&gt;maxTimeMS&lt;/tt&gt; parameter. This new feature should allow you to configure the amount of time for which an awaitData cursor will block waiting for capped insertions.&lt;/p&gt;

&lt;p&gt;The official MongoDB drivers support this new behavior via an option called &lt;tt&gt;maxAwaitTimeMS&lt;/tt&gt;. See &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-272&quot; title=&quot;Add option maxAwaitTimeMS on getMore commands&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-272&quot;&gt;&lt;del&gt;DRIVERS-272&lt;/del&gt;&lt;/a&gt; for more details, or refer to the driver-specific documentation. For PyMongo, the documentation of &lt;tt&gt;maxAwaitTimeMS&lt;/tt&gt; &lt;a href=&quot;https://api.mongodb.org/python/current/api/pymongo/cursor.html#pymongo.cursor.Cursor.max_await_time_ms&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;can be found here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I am closing as a duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18184&quot; title=&quot;Add awaitData support to getMore command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18184&quot;&gt;&lt;del&gt;SERVER-18184&lt;/del&gt;&lt;/a&gt;, which was the ticket under which this feature was developed in the server. Please let me know if you have any further questions or concerns.&lt;/p&gt;

&lt;p&gt;Best,&lt;br/&gt;
Dave&lt;/p&gt;</comment>
                            <comment id="1147395" author="alice@gothcandy.com" created="Tue, 19 Jan 2016 16:25:30 +0000"  >&lt;p&gt;A year later, any word?  This issue has technically been blocking release of a pure-MongoDB (and superior, I feel) alternative to the Celery distributed task system for four years now.  Hasn&apos;t blocked fire-and-forget task support, but anything involving waiting on tasks (producers waiting for results, or generator pipelines) dies a horrible death to starvation because of this.  Well, mostly the aforementioned doubling of latency, but you get the idea.  &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="782623" author="ramon.fernandez" created="Wed, 10 Dec 2014 13:45:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=amcgregor&quot; class=&quot;user-hover&quot; rel=&quot;amcgregor&quot;&gt;amcgregor&lt;/a&gt;, the fixversion went from &quot;debugging with submitter&quot;, which means we&apos;re working on our end to verify the issue and its impact, to &quot;2.9 Desired&quot;, which means we want to include a fix in the next development version. The fixversion will change again to 2.9.X when this ticket is included in the planning of a specific point release.&lt;/p&gt;</comment>
                            <comment id="782496" author="alice@gothcandy.com" created="Wed, 10 Dec 2014 06:23:20 +0000"  >&lt;p&gt;I&apos;ll be sure to write less detail-filled initial reports in the future.  :wry:  I notice the Fixversion was updated.  Is there hope?&lt;/p&gt;</comment>
                            <comment id="763014" author="ramon.fernandez" created="Thu, 13 Nov 2014 00:52:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alice%40gothcandy.com&quot; class=&quot;user-hover&quot; rel=&quot;alice@gothcandy.com&quot;&gt;alice@gothcandy.com&lt;/a&gt;, apologies for the late reply. The &quot;debugging with submitter&quot; fixversion means we&apos;re working to verify whether this is a bug or not and the potential impact on users. It is often the case that we ask reporters for more information, but not always. Since you&apos;re a watcher on the ticket you&apos;ll receive any updates as they happen.&lt;/p&gt;</comment>
                            <comment id="754547" author="alice@gothcandy.com" created="Mon, 3 Nov 2014 15:37:27 +0000"  >&lt;p&gt;A week has passed with the state in &#8220;debugging with submitter&#8221; and I have had no communication at all.  &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="750422" author="alice@gothcandy.com" created="Tue, 28 Oct 2014 15:14:22 +0000"  >&lt;p&gt;While I marked this as an improvement, not operating according to the documentation and expectations provided therein may be &#8220;bug-worthy&#8221;.&lt;/p&gt;

&lt;p&gt;As it stands, falling back on polling to implement timeouts is not a long-term viable solution.  A half-second retry delay will ensure tasks which take 0.51 seconds to complete can only return data after one full second, reducing performance by half and doubling latency.  With a badly tuned capped collection (too small for the activity level) it could make the difference between getting the message and not.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="199723">SERVER-18184</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="235421">DRIVERS-272</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 3 Nov 2014 18:53:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 2 weeks, 1 day 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>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 2 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>alice@gothcandy.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlkun:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs3emv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>144714</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|hrj0pz:</customfieldvalue>

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