<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:59 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-3060] Investigate updating documentation for CommitTransaction</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-3060</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;h3&gt;&lt;a name=&quot;Context&quot;&gt;&lt;/a&gt;&lt;b&gt;Context&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2997&quot; title=&quot;WithTransaction completes despite a context cancelation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2997&quot;&gt;&lt;del&gt;GODRIVER-2997&lt;/del&gt;&lt;/a&gt; describes an issue where if a user passes a cancelable context into WithTransaction and cancels mid-transaction, then the transaction still completes. It is noted in in the documentation for WithTransaction that we do not honor cancelations:&lt;/font&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Because this method must succeed to ensure that server-side resources are properly cleaned up, context deadlines and cancellations will not be respected during this call.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The underlying method that causes this issue is CommitTransaction. Perhaps the documentation for this method should include the context limitations.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Definitionofdone&quot;&gt;&lt;/a&gt;&lt;b&gt;Definition of done&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;The following questions should be answered and documented:&lt;/p&gt;

&lt;p&gt;1. Can you cancel a context while committing a transaction? If yes, what is the difference between doing that and using WithTransaction, which is a convenience wrapper for CommitTransaction.&lt;br/&gt;
2. If you can&apos;t use the functionality of a context on CommitTransaction and WithTransaction, what is the purpose of passing a context to these methods?&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;What must be done to consider the task complete?&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;Pitfalls&quot;&gt;&lt;/a&gt;&lt;b&gt;Pitfalls&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;What should the implementer watch out for? What are the risks?&lt;/font&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2510093">GODRIVER-3060</key>
            <summary>Investigate updating documentation for CommitTransaction</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="-1">Unassigned</assignee>
                                    <reporter username="preston.vasquez@mongodb.com">Preston Vasquez</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 Nov 2023 21:50:24 +0000</created>
                <updated>Wed, 6 Dec 2023 18:18:02 +0000</updated>
                            <resolved>Mon, 4 Dec 2023 20:48:40 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5930417" author="JIRAUSER1265158" created="Wed, 6 Dec 2023 18:15:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rushil.kumar%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;rushil.kumar@mongodb.com&quot;&gt;rushil.kumar@mongodb.com&lt;/a&gt; The documentation for this should be drivers-wide, not specific to the Go Driver. You can cancel a context while committing a transaction, since reading the server response is context-oriented it&apos;s possible that a commit operation is successful but you still get an error on cancelation / timeout. When this occurs, you should just retry the transaction.&lt;/p&gt;

&lt;p&gt;I&apos;ve created &lt;a href=&quot;https://jira.mongodb.org/browse/DOCSP-34822&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/DOCSP-34822&lt;/a&gt; for the team to make this more clear at a documentation level.&lt;/p&gt;</comment>
                            <comment id="5930325" author="rushil.kumar" created="Wed, 6 Dec 2023 17:49:40 +0000"  >&lt;p&gt;I am bit unclear on why this ticket was closed out. I don&apos;t think the questions in the ticket description were answered yet.&lt;/p&gt;</comment>
                            <comment id="5924407" author="JIRAUSER1275346" created="Mon, 4 Dec 2023 20:48:40 +0000"  >&lt;p&gt;The addition of this comment (in thread) suggests that we want users to avoid doing something we allow them to do.&lt;/p&gt;</comment>
                            <comment id="5907359" author="rushil.kumar" created="Mon, 27 Nov 2023 21:55:10 +0000"  >&lt;p&gt;In addition, maybe it is worth updating the documentation for WithTransaction to indicate a cancellable-context can be passed in since it now wraps the passed in context with a background context? &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#Session&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#Session&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Because this method must succeed to ensure that server-side resources are&lt;br/&gt;
	// properly cleaned up, context deadlines and cancellations will not be respected during this&lt;br/&gt;
	// call&lt;/p&gt;&lt;/blockquote&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2451621">GODRIVER-2997</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                        <customfield id="customfield_23812" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Assigned Team</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26446"><![CDATA[Go Drivers]]></customfieldvalue>

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