<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:56:53 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>[SERVER-41126] Allow aborting a transaction on mongos even if the transaction has no participants</title>
                <link>https://jira.mongodb.org/browse/SERVER-41126</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;TransactionRouter::abortTransaction &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e4b13ae68a4eef9393357038f09f14bfd8102050/src/mongo/s/transaction_router.cpp#L789&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;asserts that there is at least one participant&lt;/a&gt;, but we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e4b13ae68a4eef9393357038f09f14bfd8102050/src/mongo/s/transaction_router.cpp#L725-L732&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;allow committing without any participants&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;If we allow one, we should allow the other.&lt;/p&gt;</description>
                <environment></environment>
        <key id="767400">SERVER-41126</key>
            <summary>Allow aborting a transaction on mongos even if the transaction has no participants</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="matthew.saltz@mongodb.com">Matthew Saltz</assignee>
                                    <reporter username="esha.maharishi@mongodb.com">Esha Maharishi</reporter>
                        <labels>
                            <label>sharding-wfbf-day</label>
                    </labels>
                <created>Mon, 13 May 2019 21:15:50 +0000</created>
                <updated>Wed, 5 Jun 2019 12:49:18 +0000</updated>
                            <resolved>Tue, 4 Jun 2019 21:57:59 +0000</resolved>
                                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2271477" author="matthew.saltz" created="Tue, 4 Jun 2019 21:57:50 +0000"  >&lt;p&gt;That makes sense. Closing as suggested&lt;/p&gt;</comment>
                            <comment id="2271256" author="esha.maharishi@10gen.com" created="Tue, 4 Jun 2019 20:59:20 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matthew.saltz&quot; class=&quot;user-hover&quot; rel=&quot;matthew.saltz&quot;&gt;matthew.saltz&lt;/a&gt;, now I realize there is a bit of a difference between having no participants for commitTransaction and abortTransaction.&lt;/p&gt;

&lt;p&gt;The only way commitTransaction should be received is if all earlier statements were successful, so the only way to have no participants at commit time is if one of the statements was a read on a non-existent database.&lt;/p&gt;

&lt;p&gt;However, abortTransaction can be received even if an earlier statement failed before targeting any participants. In fact, &lt;a href=&quot;https://docs.mongodb.com/manual/core/transactions/#transactions-api&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sending abort after a failed statement is part of the documented API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Given this, I think we should make abortTransaction behave as expected in the vast majority of cases rather than in the special non-existent database case and close this as Won&apos;t Fix.&lt;/p&gt;</comment>
                            <comment id="2270886" author="matthew.saltz" created="Tue, 4 Jun 2019 17:36:03 +0000"  >&lt;p&gt;Two jstests are responsible for almost all of the failures so shouldn&apos;t be too bad to fix actually: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/f998fc0de986f4cc7b81648374c5b70d298ca2af/jstests/core/txns/aggregation_in_transaction.js#L105-L106&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;First failing test&lt;/a&gt;. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7f7ed2ccffa3d9515ae72189f7024519b63a3db0/jstests/sharding/libs/update_shard_key_helpers.js#L167-L168&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Second failing test&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;Both cases are trying abort after another unsuccessful command and expecting to see NoSuchTransaction since that transaction has already failed, which actually sort of makes sense as a behavior. And in fact, I think the aggregation_in_transaction test also runs on single replica sets, so that allows the behavior to be consistent between the two. I think the only way to fix that then would be to just remove that assertion (which may be fine). So let me know what you think.&lt;/p&gt;</comment>
                            <comment id="2270852" author="matthew.saltz" created="Tue, 4 Jun 2019 17:23:07 +0000"  >&lt;p&gt;I tried this out quickly and even after fixing the unit tests there are a &lt;a href=&quot;https://evergreen.mongodb.com/version/5cf68594850e61428b177762&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;number of jstests which fail&lt;/a&gt;. Based on the earlier comment then, it seems like we shouldn&apos;t bother fixing this? &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.maharishi&quot; class=&quot;user-hover&quot; rel=&quot;esha.maharishi&quot;&gt;esha.maharishi&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2268725" author="kaloian.manassiev" created="Mon, 3 Jun 2019 15:48:36 +0000"  >&lt;p&gt;I think the difference between a shard and a router transaction is that the router has the state &quot;I received some transaction commands, but didn&apos;t find anywhere to route them&quot; whereas there is no situation where a shard received something with beginTransaction, but didn&apos;t actually do anything (even if that &quot;anything&quot; is to just update the participant state).&lt;/p&gt;

&lt;p&gt;So to answer your question - yes it is kind of accurate with the caveat above.&lt;/p&gt;</comment>
                            <comment id="2268692" author="matthew.saltz" created="Mon, 3 Jun 2019 15:35:27 +0000"  >&lt;p&gt;I noticed &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e4b13ae68a4eef9393357038f09f14bfd8102050/src/mongo/s/transaction_router.cpp#L786&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this comment&lt;/a&gt; says that this is mimicking the behavior on the shard. Do we know if that&apos;s still accurate?&lt;/p&gt;</comment>
                            <comment id="2245968" author="greg.mckeon" created="Tue, 14 May 2019 15:20:31 +0000"  >&lt;p&gt;If any tests fail, don&apos;t fix this.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 14 May 2019 15:20:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 36 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 36 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>greg.mckeon@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>matthew.saltz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huzf5j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|huor2v:</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>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3002">Sharding 2019-06-17</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huz1ev:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>