<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:07 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>[GODRIVER-2672] Comprehensively checking for transaction error labels is not possible</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2672</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary &lt;/h4&gt;
&lt;p&gt;Per the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst#transienttransactionerror&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;transactions spec&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Any command error that includes the &quot;TransientTransactionError&quot; error label in the &quot;errorLabels&quot; field. Any network error or server selection error encountered running any command besides commitTransaction in a transaction. In the case of command errors, the server adds the label; in the case of network errors or server selection errors where the client receives no server reply, the client adds the label.&lt;/p&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;p&gt;Drivers add the &quot;UnknownTransactionCommitResult&quot; to a server selection error from commitTransaction, even if this is the first attempt to send commitTransaction. It is true in this case that the driver knows the result: the transaction is definitely not committed. However, the &quot;UnknownTransactionCommitResult&quot; label properly communicates to the application that calling commitTransaction again may succeed.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The Go Driver does not explicitly add these labels to server selection timeouts or provide an easy way for an application to check that a given error has these labels. Currently, the only function exposed for checking error labels is &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/18475f84385500c4203660a49f681017c6798be8/mongo/errors.go#L218&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongo.ServerError#HasErrorLabel&lt;/a&gt;, but that doesn&apos;t work for this case as server selection errors are not covered by the mongo.ServerError interface.&lt;/p&gt;

&lt;p&gt;The only workaround for applications is to manually check for *topology.ServerSelectionError, which is not ideal given that this type is under the &quot;x&quot; API.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Pleaseprovidetheversionofthedriver.Ifapplicable%2CpleaseprovidetheMongoDBserverversionandtopology%28standalone%2Creplicaset%2Corshardedcluster%29.&quot;&gt;&lt;/a&gt;Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).&lt;/h4&gt;

&lt;p&gt;This issue is present in v1.11.0, which is the latest released version at the time of writing. It can be reproduced against any server version/topology that supports transactions (4.0+ replicasets, 4.2+ sharded clusters).&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;
&lt;p&gt;Spin up a single node replicaset on localhost:27017 with any MongoDB version 4.0 or higher and run &lt;a href=&quot;https://gist.github.com/divjotarora/e8b6d7a3c096d74e934b6b4ccbc31091&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this example code&lt;/a&gt;. Note that the code explicitly shuts down the server, so the node must be restarted before each invocation.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;</description>
                <environment></environment>
        <key id="2202918">GODRIVER-2672</key>
            <summary>Comprehensively checking for transaction error labels is not possible</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="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="13201">Fixed</resolution>
                                        <assignee username="qingyang.hu@mongodb.com">Qingyang Hu</assignee>
                                    <reporter username="divjot.arora@mongodb.com">Divjot Arora</reporter>
                        <labels>
                    </labels>
                <created>Mon, 5 Dec 2022 23:29:09 +0000</created>
                <updated>Sat, 28 Oct 2023 11:37:25 +0000</updated>
                            <resolved>Fri, 31 Mar 2023 23:40:52 +0000</resolved>
                                                    <fixVersion>1.11.4</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5324099" author="xgen-internal-githook" created="Tue, 4 Apr 2023 17:33:01 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Qingyang Hu&apos;, &apos;email&apos;: &apos;103950869+qingyang-hu@users.noreply.github.com&apos;, &apos;username&apos;: &apos;qingyang-hu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2672&quot; title=&quot;Comprehensively checking for transaction error labels is not possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2672&quot;&gt;&lt;del&gt;GODRIVER-2672&lt;/del&gt;&lt;/a&gt; Return ServerError with &quot;TransientTransactionError&quot; label for server selection timeouts. (#1198)&lt;br/&gt;
Branch: release/1.11&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/0351e7faf70f94078fde218e5262dfcccbeaa9c8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/0351e7faf70f94078fde218e5262dfcccbeaa9c8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5317041" author="xgen-internal-githook" created="Fri, 31 Mar 2023 23:40:14 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Qingyang Hu&apos;, &apos;email&apos;: &apos;103950869+qingyang-hu@users.noreply.github.com&apos;, &apos;username&apos;: &apos;qingyang-hu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2672&quot; title=&quot;Comprehensively checking for transaction error labels is not possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2672&quot;&gt;&lt;del&gt;GODRIVER-2672&lt;/del&gt;&lt;/a&gt; Return ServerError with &quot;TransientTransactionError&quot; label for server selection timeouts. (#1198)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/623520655eaf5f9961a92d266fd0ecaa73f42f96&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/623520655eaf5f9961a92d266fd0ecaa73f42f96&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5031822" author="JIRAUSER1259527" created="Mon, 5 Dec 2022 23:31:47 +0000"  >&lt;p&gt;This may be significantly simpler to implement once &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2579&quot; title=&quot;Incorporate connection pool checkout into server selection loop&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2579&quot;&gt;GODRIVER-2579&lt;/a&gt; is done.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="2155430">GODRIVER-2579</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="2202920">GODRIVER-2673</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

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