<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:26:16 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>[DRIVERS-2722] Change CSOT default cursor timeout mode to ITERATION</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-2722</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #fafbfc;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #fafbfc;&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;The CSOT spec requires both applying client-side timeouts via a language-specific timeout mechanism and applying server-side timeouts by sending &lt;tt&gt;maxTimeMS&lt;/tt&gt; with commands. The spec &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/client-side-operations-timeout.rst#maxtimems-accounts-for-server-rtt&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;suggests&lt;/a&gt; that a primary purpose for sending &lt;tt&gt;maxTimeMS&lt;/tt&gt; is to prevent connection churn:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;When constructing a command, drivers use the timeoutMS option to derive a value for the maxTimeMS command option and the socket timeout ... To allow the server to gracefully error and avoid churn, drivers must account for the network round trip in the maxTimeMS calculation.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;However, managing cursor lifetime doesn&apos;t mitigate connection churn. Managing the lifetime of a single &lt;tt&gt;getMore&lt;/tt&gt; can reduce connection churn, so sending &lt;tt&gt;maxTimeMS&lt;/tt&gt; with each &lt;tt&gt;getMore&lt;/tt&gt; seems to make more sense than applying it to the entire cursor lifetime. We should amend the CSOT spec to make the default &lt;tt&gt;timeoutMode=ITERATION&lt;/tt&gt;. If users specifically want to control the cursor lifetime with the CSOT timeout, they can enable it using &lt;tt&gt;timeoutMode=CURSOR_LIFETIME&lt;/tt&gt;. They can also control cursor lifetime by explicitly closing the cursor.&lt;/p&gt;

&lt;p&gt;Note that the above is not a problem for drivers that implement CSOT &lt;em&gt;and&lt;/em&gt; have a &lt;tt&gt;timeoutMode&lt;/tt&gt; option. However, &lt;tt&gt;timeoutMode&lt;/tt&gt; is currently optional and is not implemented in some drivers that implement CSOT. The CSOT spec should require a safer default behavior for drivers that do not implement the &lt;tt&gt;timeoutMode&lt;/tt&gt; option.&lt;/p&gt;

&lt;p&gt;Motivated by &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2944&quot; title=&quot;Support CSOT spec timeoutMode for non-tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2944&quot;&gt;GODRIVER-2944&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;Motivation&quot;&gt;&lt;/a&gt;&lt;b&gt;Motivation&lt;/b&gt;&lt;/h3&gt;
&lt;h4&gt;&lt;a name=&quot;Whoistheaffectedenduser%3F&quot;&gt;&lt;/a&gt;Who is the affected end user?&lt;/h4&gt;

&lt;p&gt;Customers who enable CSOT timeouts and run a &lt;tt&gt;find&lt;/tt&gt; or &lt;tt&gt;aggregate&lt;/tt&gt; operation. Note that only applies to drivers that do not implement the &lt;tt&gt;timeoutMode&lt;/tt&gt; option.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Howdoesthisaffecttheenduser%3F&quot;&gt;&lt;/a&gt;How does this affect the end user?&lt;/h4&gt;

&lt;p&gt;Cursors may time out server-side before they are done reading from them. Customers may not expect &lt;tt&gt;timeoutMS&lt;/tt&gt; to control cursor lifetime because it is advertised as a client-side timeout mechanism.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Howlikelyisitthatthisproblemorusecasewilloccur%3F&quot;&gt;&lt;/a&gt;How likely is it that this problem or use case will occur?&lt;/h4&gt;

&lt;p&gt;For customers using drivers that implement CSOT but do not implement the &lt;tt&gt;timeoutMode&lt;/tt&gt; option, it will occur anytime the expected lifetime of a cursor is longer than the configured client-side timeout (i.e. &lt;tt&gt;timeoutMS&lt;/tt&gt;).&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Iftheproblemdoesoccur%2Cwhataretheconsequencesandhowseverearethey%3F&quot;&gt;&lt;/a&gt;If the problem does occur, what are the consequences and how severe are they?&lt;/h4&gt;

&lt;p&gt;Prevents long-running cursor iteration operations from completing. Customers may get around the issue by increasing &lt;tt&gt;timeoutMS&lt;/tt&gt; if they can determine the two are connected.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Isthisissueurgent%3F&quot;&gt;&lt;/a&gt;Is this issue urgent?&lt;/h4&gt;

&lt;p&gt;No.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Isthisticketrequiredbyadownstreamteam%3F&quot;&gt;&lt;/a&gt;Is this ticket required by a downstream team?&lt;/h4&gt;

&lt;p&gt;The current behavior is causing issues for the TAR (mongosync) team. See &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2944&quot; title=&quot;Support CSOT spec timeoutMode for non-tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2944&quot;&gt;GODRIVER-2944&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Isthisticketonlyfortests%3F&quot;&gt;&lt;/a&gt;Is this ticket only for tests?&lt;/h4&gt;

&lt;p&gt;No.&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;AcceptanceCriteria&quot;&gt;&lt;/a&gt;&lt;b&gt;Acceptance Criteria&lt;/b&gt;&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;CSOT spec is amended to make the default cursor timeout mode ITERATION.&lt;/li&gt;
	&lt;li&gt;(Optional) Rationale section is amended to describe the reason it was switched from CURSOR_LIFETIME to ITERATION.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="2441477">DRIVERS-2722</key>
            <summary>Change CSOT default cursor timeout mode to ITERATION</summary>
                <type id="14901" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14700&amp;avatarType=issuetype">Spec Change</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="10049" iconUrl="https://jira.mongodb.org/images/icons/statuses/information.png" description="">Needs Triage</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="shane.harvey@mongodb.com">Shane Harvey</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Wed, 13 Sep 2023 18:33:24 +0000</created>
                <updated>Tue, 21 Nov 2023 18:42:11 +0000</updated>
                                                                <component>CSOT</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2417350">GODRIVER-2944</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_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10748"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i28dy0:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>