<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:19:22 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>[CDRIVER-3910] Retried commands may not consider wire version changes</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3910</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.rst#b-sending-an-equivalent-command-for-the-second-attempt&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;3b. Sending an equivalent command for the second attempt?&lt;/a&gt; in the Retryable Reads spec allows drivers to do one of two things when retrying a command:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;If the wire version changes between retry attempts, the driver can recreate the command document according to the wire version of the server selected for the retry attempt. Any error in doing so should result in skipping the retry attempt and raising the original error.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;If the driver doesn&apos;t recreate command documents, it can raise an error whenever the wire version dips between retry attempts.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The Retryable Writes command has no equivalent language (see &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-1570&quot; title=&quot;Consider wire version changes when sending equivalent write command on a retry attempt&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-1570&quot;&gt;DRIVERS-1570&lt;/a&gt;), although this may still be a concern.&lt;/p&gt;

&lt;p&gt;AFAIK, libmongoc tracks hint usage for update/delete through &lt;tt&gt;_mongoc_write_command_execute_idl&lt;/tt&gt; and would raise an error if it&apos;s not supported by the selected server&apos;s wire protocol version (for either the original or any retry attempt). For findAndModify, libmongoc handles its retrying within &lt;tt&gt;mongoc_collection_find_and_modify_with_opts&lt;/tt&gt; and only appears to check hint support against the wire version of the originally selected server. Perhaps libmongoc relies on the selected server for the retry attempt to raise an error if it also receives hint and doesn&apos;t support the option.&lt;/p&gt;

&lt;p&gt;Any other retried commands would be read operations and route through &lt;tt&gt;_mongoc_client_retryable_read_command_with_stream&lt;/tt&gt;. Neither that function nor its write equivalent (relevant for PHP, which uses the generic write command runner) inspects options (and I wouldn&apos;t expect them to). The onus for checking option support likely belongs in specific operation methods, as is done for &lt;tt&gt;mongoc_collection_find_and_modify_with_opts&lt;/tt&gt;. Either way, it seems like libmongoc doesn&apos;t conform to the aforecited rules from the Retryable Reads spec. It neither recreates commands based on the second server&apos;s wire version, nor does it raise errors if the wire version dips. The original command is sent as-is.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1628288">CDRIVER-3910</key>
            <summary>Retried commands may not consider wire version changes</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Feb 2021 07:18:25 +0000</created>
                <updated>Thu, 31 Mar 2022 13:40:56 +0000</updated>
                                                                            <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1628283">PHPLIB-623</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1628285">DRIVERS-1570</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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6n9j:</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>