<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:38:41 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-2467] Return a Context error if WithTransaction exited due to Context expiration</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2467</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;Currently it&apos;s possible for a &lt;tt&gt;WithTransaction&lt;/tt&gt; call to return an error when the context is canceled or times out that does not indicate that the error is related to the context expiring.&lt;/p&gt;

&lt;p&gt;Consider the context &quot;done&quot; check in &lt;tt&gt;WithTransaction&lt;/tt&gt; &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/95de0fb36ca077bbe9a92b3fbf66ef0d28c6eeae/mongo/session.go#L199-L202&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. If the context expires while handling an error unrelated to context expiration (e.g. a transient server error), the returned error will not indicate that &lt;tt&gt;WithTransaction&lt;/tt&gt; returned due to the context expiring. That is potentially confusing to users because the error returned from &lt;tt&gt;WithTransaction&lt;/tt&gt; doesn&apos;t always specify why &lt;tt&gt;WithTransaction&lt;/tt&gt; stopped retrying.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/transactions-convenient-api/transactions-convenient-api.rst#sequence-of-actions&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;spec for Convenient Transactions&lt;/a&gt; does specify using a maximum timeout of 120 seconds and requires that drivers return the original error if that timeout is reached without completing the transaction. However, the spec doesn&apos;t include any analog for Go&apos;s context-based cancellation or timeout, so the Go driver just uses the same error handling logic as the &lt;tt&gt;WithTransaction&lt;/tt&gt; 120 second max timeout.&lt;/p&gt;

&lt;p&gt;Update &lt;tt&gt;WithTransaction&lt;/tt&gt; to either return the context error (e.g. &lt;tt&gt;context.Canceled&lt;/tt&gt; or &lt;tt&gt;context.DeadlineExceeded&lt;/tt&gt;) or the original error wrapped by the context error.&lt;/p&gt;

&lt;p&gt;Note that this is an alternative to &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2468&quot; title=&quot;Don&amp;#39;t check Context expiration in WithTransaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2468&quot;&gt;&lt;del&gt;GODRIVER-2468&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2074688">GODRIVER-2467</key>
            <summary>Return a Context error if WithTransaction exited due to Context expiration</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Jun 2022 21:52:17 +0000</created>
                <updated>Tue, 23 Jan 2024 00:25:44 +0000</updated>
                            <resolved>Tue, 23 Jan 2024 00:25:44 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4642857" author="JIRAUSER1258790" created="Mon, 27 Jun 2022 18:45:13 +0000"  >&lt;p&gt;Related conversation:&#160;&lt;a href=&quot;https://mongodb.slack.com/archives/C7WJZNUTA/p1655484492898759&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodb.slack.com/archives/C7WJZNUTA/p1655484492898759&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="2056774">GODRIVER-2438</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2074694">GODRIVER-2468</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>GODRIVER-1787</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6jqv:s0000yzu1</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>