<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:25:51 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-2552] Remove average and 90th percentile RTT times from server description</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-2552</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;Most fields on a server description as described in the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/31bbf60c4f3008d77fc5ca5287b165e5ea97a4a6/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#serverdescription&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ServerDescription&lt;/a&gt; section of the SDAM spec come directly from the most recent connection handshake. However &lt;tt&gt;roundTripTime&lt;/tt&gt; and &lt;tt&gt;ninetiethPercentileRoundTripTime&lt;/tt&gt; don&apos;t come from the handshake information.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://github.com/mongodb/specifications/blob/31bbf60c4f3008d77fc5ca5287b165e5ea97a4a6/source/server-discovery-and-monitoring/server-monitoring.rst#measuring-rtt&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Measuring RTT&lt;/a&gt; section of the SDAM spec describes that drivers must set the &lt;tt&gt;roundTripTime&lt;/tt&gt; and &lt;tt&gt;ninetiethPercentileRoundTripTime&lt;/tt&gt; from the current average and 90th percentile RTTs for that server, respectively, as measured by the RTT monitor:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;When constructing a ServerDescription from a streaming hello or legacy hello response, clients MUST use average and 90th percentile round trip times from the RTT task.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The problem with that approach is that setting an arbitrary snapshot of a constantly-updated value can lead to confusion and bugs when developers need up-to-date RTT data. Since the SDAM spec doesn&apos;t describe whether the &lt;tt&gt;roundTripTime&lt;/tt&gt; and &lt;tt&gt;ninetiethPercentileRoundTripTime&lt;/tt&gt; values on a server description should or must be consistently updated, driver devs who are unfamiliar with the sources of RTT data likely have no idea whether that RTT data on the server description is up-to-date or not. That may lead driver devs on a potentially time-consuming investigation into the source of and all references to that data, possibly leading to the conclusion that the data is stale and not useful. Worse, a driver dev may come to the wrong conclusion and implement a feature that uses stale RTT information, potentially leading to difficult-to-diagnose bugs.&lt;/p&gt;

&lt;p&gt;Considering many drivers do not keep the RTT data on server descriptions up-to-date, and stale RTT data is more confusing than useful, we should remove the &lt;tt&gt;roundTripTime&lt;/tt&gt; and &lt;tt&gt;ninetiethPercentileRoundTripTime&lt;/tt&gt; fields from the server description in the SDAM spec. Instead, all drivers should fetch up-to-date RTT information from the RTT monitor as described in the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/31bbf60c4f3008d77fc5ca5287b165e5ea97a4a6/source/server-discovery-and-monitoring/server-monitoring.rst#rtt-thread&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;RTT thread&lt;/a&gt; section of SDAM.&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;Drivers developers.&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;They are confused by stale RTT data on server descriptions.&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;Devs who are new to developing features that depend on RTT data likely do not understand if/when different server description fields are updated. The SDAM specification isn&apos;t clear about if/when the &lt;tt&gt;roundTripTime&lt;/tt&gt;/&lt;tt&gt;ninetiethPercentileRoundTripTime&lt;/tt&gt; fields on server descriptions should be updated, so the actual behavior may be inconsistent between drivers.&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;Devs can spend significant time tracing code and troubleshooting SDAM behaviors trying to determine if/when the &lt;tt&gt;roundTripTime&lt;/tt&gt;/&lt;tt&gt;ninetiethPercentileRoundTripTime&lt;/tt&gt; fields on a server description are updated. This can be wasted time if the dev realizes the RTT values on the server description are not consistently updated because they need up-to-date RTT data. Worse, if the dev comes to the wrong conclusion and uses stale RTT values from a server description, they may implement a feature with difficult-to-diagnose bugs.&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;No.&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;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="2265805">DRIVERS-2552</key>
            <summary>Remove average and 90th percentile RTT times from server description</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="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="12300">Won&apos;t Do</resolution>
                                        <assignee username="shane.harvey@mongodb.com">Shane Harvey</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Feb 2023 19:49:19 +0000</created>
                <updated>Fri, 16 Jun 2023 17:44:02 +0000</updated>
                            <resolved>Fri, 16 Jun 2023 17:44:02 +0000</resolved>
                                                        <component>SDAM</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5506005" author="shane.harvey" created="Fri, 16 Jun 2023 17:44:02 +0000"  >&lt;p&gt;Thanks Matt! Closing for the reasons above. An additional reason is that ServerDescription is a public api and we don&apos;t want to make breaking changes.&lt;/p&gt;</comment>
                            <comment id="5328293" author="shane.harvey" created="Wed, 5 Apr 2023 21:49:13 +0000"  >&lt;p&gt;I believe that is a feature to help accomplish &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/client-side-operations-timeout.rst#command-execution&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this requirement&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;If timeoutMS is set, drivers MUST append a maxTimeMS field to commands executed against a MongoDB server using the minRoundTripTime field of the selected server. Note that this value MUST be retrieved during server selection using the servers field of the same TopologyDescription that was used for selection before the selected server&apos;s description can be modified. Otherwise, drivers may be subject to a race condition where a server is reset to the default description (e.g. due to an error in the monitoring thread) after it has been selected but before the RTT is retrieved.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;We want to avoid the RTT and the server selection info from becoming out of sync. Putting the RTT on the ServerDescription helps accomplish that. It&apos;s also better for observability since users can log the RTT info from the ServerDescription. &lt;/p&gt;</comment>
                            <comment id="5317264" author="JIRAUSER1259527" created="Sat, 1 Apr 2023 05:12:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=shane.harvey%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;shane.harvey@mongodb.com&quot;&gt;shane.harvey@mongodb.com&lt;/a&gt; that&apos;s a good point. However, &quot;stale&quot; in this case refers to staleness relative to the best source of information. For example, the best source of information for server state in the driver is the most recent connection handshake or heartbeat response. The best source of information for round-trip times is the RTT monitor. Storing snapshots of RTT monitor values on a server description can result in stale data relative to the data available from the RTT monitor. That is, if you need round-trip time data, you should always get it from the RTT monitor, so there&apos;s no reason to store it on a server description.&lt;/p&gt;</comment>
                            <comment id="5304519" author="shane.harvey" created="Mon, 27 Mar 2023 22:39:53 +0000"  >&lt;p&gt;I don&apos;t agree with this ticket&apos;s rationale because even fields that are reported by the server in the hello command response can become stale. For example, hosts, isWritablePrimary, $clusterTime, operationTime, etc.. In fact, almost every single field can become stale right after the server sends it. I&apos;d recommend closing this ticket and &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2691&quot; title=&quot;Deprecate &amp;quot;description.Server&amp;quot; fields that don&amp;#39;t come from a handshake&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2691&quot;&gt;&lt;del&gt;GODRIVER-2691&lt;/del&gt;&lt;/a&gt;.&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2210198">GODRIVER-2691</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|i1en9s:</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>