<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:24:33 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-2035] Use minimum RTT for CSOT maxTimeMS calculation instead of 90th percentile</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-2035</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;In the PR review for the timeout spec &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matt.dale&quot; class=&quot;user-hover&quot; rel=&quot;matt.dale&quot;&gt;matt.dale&lt;/a&gt; &lt;a href=&quot;https://github.com/mongodb/specifications/pull/881#discussion_r717289991&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;provided a suggestion which was never resolved&lt;/a&gt;. To quote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Using the 90th percentile RTT latency will result in some operations that are likely to complete being cancelled instead.&lt;/p&gt;

&lt;p&gt;Let&apos;s consider a Find operation that completes quickly on the server (i.e. &amp;lt;1ms) running on an Atlas cluster, so almost all of the latency is from the network round trip. There are 3 buckets of timing conditions the driver will encounter:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;The client-side deadline is greater than (now + max observed RTT); the operation will almost certainly complete before the deadline.&lt;/li&gt;
	&lt;li&gt;The client-side deadline is between &lt;span class=&quot;error&quot;&gt;&amp;#91;(now + min observed RTT), (now + max observed RTT)&amp;#93;&lt;/span&gt;; the operation may complete or may fail due to timeout.&lt;/li&gt;
	&lt;li&gt;The client-side deadline is less than (now + min observed RTT); the operation will almost certainly fail due to timeout.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The operations we&apos;re interested in are in bucket 2. By assuming the network round trip will take the 90th percentile observed RTT, we may cancel operations that have a nearly 90% chance of completing before the deadline. Cancelling operations is dangerous because we&apos;re actually preventing the driver from doing work. We should instead bias toward cancelling as few operations that have a reasonable chance of completing as possible, in exchange for also letting more operations time out.&lt;/p&gt;

&lt;p&gt;I propose that we change the cancellation threshold to the 5-minute minimum RTT (i.e. minimum RTT observed in the last 5 minutes) instead of the 90th percentile. While the 10th or 25th percentile more closely match the &quot;reasonable chance of succeeding&quot; threshold, the added complexity of using the t-digest algorithm doesn&apos;t seem to justify the small optimization.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;We should reconsider the 90th RTT heuristic used for preventing sending an operation and setting maxTimeMS.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1967173">DRIVERS-2035</key>
            <summary>Use minimum RTT for CSOT maxTimeMS calculation instead of 90th percentile</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="13453" iconUrl="https://jira.mongodb.org/images/icons/status_generic.gif" description="">Implementing</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="shane.harvey@mongodb.com">Shane Harvey</assignee>
                                    <reporter username="shane.harvey@mongodb.com">Shane Harvey</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Jan 2022 01:16:19 +0000</created>
                <updated>Tue, 16 Jan 2024 14:48:12 +0000</updated>
                                                                <component>CSOT</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5205759" author="xgen-internal-githook" created="Thu, 16 Feb 2023 22:09:18 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Shane Harvey&apos;, &apos;email&apos;: &apos;shnhrv@gmail.com&apos;, &apos;username&apos;: &apos;ShaneHarvey&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-2035&quot; title=&quot;Use minimum RTT for CSOT maxTimeMS calculation instead of 90th percentile&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-2035&quot;&gt;DRIVERS-2035&lt;/a&gt; Use minimum RTT for CSOT maxTimeMS calculation instead of 90th percentile (#1350)&lt;/p&gt;

&lt;p&gt;Require at least 2 RTT samples, otherwise use 0 as RTT. Only keep last 10 samples.&lt;br/&gt;
Update tests to wait for multiple RTTs.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/specifications/commit/c06650d86f7e47ea30cb2d992942bcec6ef155f9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/c06650d86f7e47ea30cb2d992942bcec6ef155f9&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10620">
                    <name>Issue split</name>
                                            <outwardlinks description="split to">
                                        <issuelink>
            <issuekey id="2544699">NODE-5825</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2272865">GODRIVER-2762</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2272863">PYTHON-3616</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1612587">NODE-3078</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_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Drivers must use the minimum RTT for CSOT maxTimeMS calculation instead of 90th percentile. At least 2 RTT samples are required otherwise drivers must use 0 as RTT. Only keep at most the last 10 samples. These changes were made to avoid preemptively failing operations due to inaccurate or unstable RTT measurements.&lt;/p&gt;

&lt;p&gt;Spec change commit: &lt;a href=&quot;https://github.com/mongodb/specifications/commit/c06650d86f7e47ea30cb2d992942bcec6ef155f9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/c06650d86f7e47ea30cb2d992942bcec6ef155f9&lt;/a&gt;&lt;br/&gt;
Spec change PR: &lt;a href=&quot;https://github.com/mongodb/specifications/pull/1350&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/pull/1350&lt;/a&gt;&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10940"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_23952" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Driver Compliance</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<style type='text/css'>
         #scriptField, #scriptField *{
                border: 1px solid black;
            }

            #scriptField{
                border-collapse: collapse;
            }

            #scriptField td {
                text-align: center; /* Center-align text in table cells */
            }

            #scriptField td.key {
                text-align: left; /* Left-align text in the Key column */
            }

            #scriptField a {
                text-decoration: none; /* Remove underlines from links */
                border: none; /* Remove border from links */
            }
            
            /* Add green background color to cells with FixVersion */
            #scriptField td.hasFixVersion {
                background-color: #00FF00; /* Green color code */
            }

            /* Center-align the first row headers */
            #scriptField th {
                text-align: center;
            }
        </style>
<table id='scriptField'>
  <tr>
    <th>Key</th>
    <th>Status/Resolution</th>
    <th>FixVersion</th>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PYTHON-3616'>PYTHON-3616</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>4.4</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/GODRIVER-2762'>GODRIVER-2762</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.0.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/NODE-5825'>NODE-5825</a>
    </td>
    <td>Scheduled</td>
    <td class=''></td>
  </tr>
</table>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DRIVERS-555</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY23Q2</label>
            <label>FY23Q3</label>
            <label>FY24Q2</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i00isv:</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_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 22 Feb 2023 00:00:00 +0000</customfieldvalue>

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