<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:38:55 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-2565] Context cancelation before transaction commit does not abort</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2565</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;The title of this ticket is my best guess at what&apos;s happening in the following situation &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;. (This came from &lt;a href=&quot;https://mongodb.slack.com/archives/C7WJZNUTA/p1664474654586019&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this slack conversation&lt;/a&gt;). See the attached test; occasionally, the test will loop continuously in the second transaction as the first transaction has not properly aborted its identical write server-side. I believe this is because we do not run &lt;tt&gt;AbortTransaction&lt;/tt&gt; correctly when &lt;tt&gt;CommitTransaction&lt;/tt&gt; encounters a context cancelation, but I&apos;m not exactly sure. This requires further investigation and even if the aforementioned theory is correct, we need a more consistent regression test.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2149065">GODRIVER-2565</key>
            <summary>Context cancelation before transaction commit does not abort</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="benji.rewis@mongodb.com">Benji Rewis</assignee>
                                    <reporter username="benji.rewis@mongodb.com">Benji Rewis</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Sep 2022 16:12:19 +0000</created>
                <updated>Sat, 28 Oct 2023 11:37:28 +0000</updated>
                            <resolved>Mon, 31 Oct 2022 17:50:55 +0000</resolved>
                                    <version>1.10.2</version>
                                    <fixVersion>1.11.0</fixVersion>
                    <fixVersion>1.10.4</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4941485" author="benji.rewis" created="Mon, 31 Oct 2022 17:50:55 +0000"  >&lt;p&gt;We now call &lt;tt&gt;AbortTranasction&lt;/tt&gt; if the context has errored right before the &lt;tt&gt;CommitLoop&lt;/tt&gt; in &lt;tt&gt;WithTransaction&lt;/tt&gt;. This should help reduce the possibility that transactions are left open server-side when the context errors in &lt;tt&gt;WithtTransaction&lt;/tt&gt;. &lt;/p&gt;

&lt;p&gt;Note that if the context errors after the new check and before &lt;tt&gt;commitTransaction&lt;/tt&gt; is actually sent to the server, the transaction will &lt;em&gt;still&lt;/em&gt; be left open server-side.&lt;/p&gt;</comment>
                            <comment id="4941476" author="xgen-internal-githook" created="Mon, 31 Oct 2022 17:48:41 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Benjamin Rewis&apos;, &apos;email&apos;: &apos;32186188+benjirewis@users.noreply.github.com&apos;, &apos;username&apos;: &apos;benjirewis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2565&quot; title=&quot;Context cancelation before transaction commit does not abort&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2565&quot;&gt;&lt;del&gt;GODRIVER-2565&lt;/del&gt;&lt;/a&gt; Abort transaction before CommitLoop if context errored. (#1101)&lt;br/&gt;
Branch: release/1.10&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/2855941f871b17048a35b1ac97dc8e11fc61b9da&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/2855941f871b17048a35b1ac97dc8e11fc61b9da&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4941467" author="xgen-internal-githook" created="Mon, 31 Oct 2022 17:46:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Benjamin Rewis&apos;, &apos;email&apos;: &apos;32186188+benjirewis@users.noreply.github.com&apos;, &apos;username&apos;: &apos;benjirewis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2565&quot; title=&quot;Context cancelation before transaction commit does not abort&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2565&quot;&gt;&lt;del&gt;GODRIVER-2565&lt;/del&gt;&lt;/a&gt; Abort transaction before CommitLoop if context errored. (#1101)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/edfc51c61d587862ecb913026813b2dfba85cc90&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/edfc51c61d587862ecb913026813b2dfba85cc90&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4928508" author="benji.rewis" created="Wed, 26 Oct 2022 14:21:46 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/1101&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/1101&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4901917" author="benji.rewis" created="Thu, 13 Oct 2022 19:08:47 +0000"  >&lt;p&gt;Apologies for the delay in response. I can repro the issue and I believe it&#8217;s happening because we never run &lt;tt&gt;AbortTransaction&lt;/tt&gt; when &lt;tt&gt;CommitTransaction&lt;/tt&gt; fails in &lt;tt&gt;WithTransaction&lt;/tt&gt; (whether due to timeout or anything else). This is the specified behavior for all drivers, but is a little strange when we &lt;em&gt;know&lt;/em&gt; the &lt;tt&gt;CommitTransaction&lt;/tt&gt; call will fail due to something like a canceled context. Opened &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-2471&quot; title=&quot;Run abortTransaction when commitTransaction in withTransaction times out&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-2471&quot;&gt;DRIVERS-2471&lt;/a&gt; to consider a cross-drivers change. In the meantime, I may add a context error check right before CommitTransaction in WithTransaction &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/master/mongo/session.go#L216&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;, but I think there could still be a context error during CommitTransaction that would cause the transaction to remain open on the server...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2158765">DRIVERS-2471</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2451621">GODRIVER-2997</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="405283" name="canceled_test.go" size="2606" author="benji.rewis@mongodb.com" created="Fri, 30 Sep 2022 16:11:21 +0000"/>
                    </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0v1iw:</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>