<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:52:52 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-39704] Allow mongos to retry on stale version and snapshot errors within a transaction</title>
                <link>https://jira.mongodb.org/browse/SERVER-39704</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Because of the problem described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39624&quot; title=&quot;Reordering of transaction requests from mongos can lead shards to unexpectedly have in-progress transactions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39624&quot;&gt;&lt;del&gt;SERVER-39624&lt;/del&gt;&lt;/a&gt;, mongos&apos;s ability to retry transaction statements that fail on stale version and snapshot errors without aborting the overall sharded transaction was disabled in favor of returning a TransientTransactionError label, so the client retries the entire transaction with a higher transaction number.&lt;/p&gt;

&lt;p&gt;This behavior could be problematic for long running transactions in particular because a stale version error on a late statement would force the entire transaction to be retried, instead of just the failed statement. The purpose of this ticket is to come up with a safe way to allow mongos to retry on these errors within a transaction that addresses the problem from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39624&quot; title=&quot;Reordering of transaction requests from mongos can lead shards to unexpectedly have in-progress transactions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39624&quot;&gt;&lt;del&gt;SERVER-39624&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="701590">SERVER-39704</key>
            <summary>Allow mongos to retry on stale version and snapshot errors within a transaction</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="12452" iconUrl="https://jira.mongodb.org/images/icons/statuses/generic.png" description="">Needs Scheduling</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-cluster-scalability">Backlog - Cluster Scalability</assignee>
                                    <reporter username="jack.mulrow@mongodb.com">Jack Mulrow</reporter>
                        <labels>
                            <label>ShardedTxn:FutureOptimizations</label>
                            <label>pm-564</label>
                            <label>sharding-causes-bfs-hard</label>
                    </labels>
                <created>Wed, 20 Feb 2019 23:21:24 +0000</created>
                <updated>Fri, 17 Nov 2023 22:07:02 +0000</updated>
                                                                            <component>Sharding</component>
                                        <votes>4</votes>
                                    <watches>43</watches>
                                                                                                                <comments>
                            <comment id="5763988" author="JIRAUSER1264020" created="Mon, 9 Oct 2023 13:05:53 +0000"  >&lt;p&gt;Hi team, any ETA of this fix? Thanks.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="2157845" author="jack.mulrow" created="Wed, 20 Feb 2019 23:23:45 +0000"  >&lt;p&gt;Copying my proposed approach from the linked ticket:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Since the fundamental problem is that mongos can send multiple requests to the same shard with&#160;&lt;tt&gt;startTransaction=true&lt;/tt&gt;&#160;for a txnId, we might be able to fix this by adding another field to the txnId that is generated by mongos and transparent to the user. Then each time mongos sends a shard&#160;&lt;tt&gt;startTransaction=true&lt;/tt&gt;, it can generate a new value for this field (transaction version?) that shards can use to distinguish the earlier attempts. This field could be scoped to a particular txnNumber, so the existing machinery for client retries on transient transaction errors would still work, i.e. any comparison of txnIds always compares the txnNumber before this field.&lt;/p&gt;

&lt;p&gt;If we include each shard&apos;s expected version in the participant list and send it with prepare/commit (or every request within a transaction), we can abort the entire transaction if any shard has an unexpected version and return a transient transaction error label so the client can retry with a higher txnNumber, since this should only happen because of reordered messages if the client operates correctly.&lt;/p&gt;

&lt;p&gt;We could even get rid of the aborts between statement retries by making shards treat a higher transaction version the same as a higher txnNumber and overwrite any state from a previous attempt.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="607185">SERVER-37207</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1813729">RUST-900</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="890356">CDRIVER-3301</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="789867">SERVER-41532</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1301720">SERVER-47268</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1988194">SERVER-63887</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="852614">PYTHON-1901</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="698905">SERVER-39624</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="629367">CSHARP-2428</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1808901">PHPLIB-677</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="938605">RUBY-1942</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26583"><![CDATA[Cluster Scalability]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000pkUWPQA2, 5002K00000uyYRoQAM, 5006R00001nJGNaQAO, 5006R00001nKvabQAC, 5006R00001oyA3QQAU, 5006R00001s9H3fQAE, 5006R00001sE4N7QAK, 5006R00001tu4mVQAQ, 5006R00001ufMV6QAM, 5006R00001wMm5AQAS, 5006R00001veAHVQA2, 5006R00001w0vzVQAQ]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 1 Mar 2019 15:44:03 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        17 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<a href='https://jira.mongodb.org/browse/WRITING-3661'>WRITING-3661</a>]]></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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1630</customfieldvalue>
                        </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>dbeng-pm-bot</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            17 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>33.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-cluster-scalability</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>karen.yau@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huo7lj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrfs71:ofi</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="2825">Sharding 2019-03-25</customfieldvalue>

                        </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|huntuv:</customfieldvalue>

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