<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:34:36 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-54828] Optimization: tenant migration blocker should not block reads for too long</title>
                <link>https://jira.mongodb.org/browse/SERVER-54828</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The current code is not efficient for both us and users. For the users, a blocked transactional read will likely eventually fail anyway because the migration will more likely to succeed than abort. Moreover, if the user repeats the read a bit later it may actually succeed because its cluster time will move forward.&lt;/p&gt;

&lt;p&gt;For us this is not efficient because we can block too many reads and face thundering herd when the migration is over. We can actually try to process what we can in the meantime.&lt;/p&gt;

&lt;p&gt;The solution is to fail the read after some fixed timeout (like ~1 second) with some error code that is not automatically retried and will trigger re-doing the transaction. 1 second should be enough to have sufficient backoff for us to not overload the server with retries, and short enough to not make users to complain.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1634890">SERVER-54828</key>
            <summary>Optimization: tenant migration blocker should not block reads for too long</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="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="13202">Works as Designed</resolution>
                                        <assignee username="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="andrew.shuvalov@mongodb.com">Andrew Shuvalov</reporter>
                        <labels>
                    </labels>
                <created>Fri, 26 Feb 2021 18:44:25 +0000</created>
                <updated>Fri, 27 Oct 2023 13:52:29 +0000</updated>
                            <resolved>Thu, 9 Sep 2021 14:34:06 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4047427" author="jesse" created="Thu, 9 Sep 2021 14:34:06 +0000"  >&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                            <comment id="4047260" author="JIRAUSER1256988" created="Thu, 9 Sep 2021 13:51:52 +0000"  >&lt;p&gt;Good point, I agree. Perhaps this ticket can be closed, I was trying to be proactive to not miss a possible deficiency.&lt;/p&gt;</comment>
                            <comment id="4047239" author="jesse" created="Thu, 9 Sep 2021 13:46:27 +0000"  >&lt;p&gt;&quot;From the user experience point of view - failing the read faster is the preferred outcome here.&quot; If the read fails faster on the donor, the client will immediately retry on the donor, and fail again, in a loop until the migration commits. Then the next read will be directed to the recipient (by Atlas routing) and succeed.&lt;/p&gt;

&lt;p&gt;In the current design (IIUC) a read on the donor blocks until the migration commits, then fails once. The client retries the read, which Atlas directs to the recipient, where it succeeds. I think this minimizes latency, because the client retries at precisely the right moment, instead of retrying periodically in a loop. It also minimizes load from useless retries during migration.&lt;/p&gt;

&lt;p&gt;Does that sound right to you or am I missing something?&lt;/p&gt;</comment>
                            <comment id="4047143" author="JIRAUSER1256988" created="Thu, 9 Sep 2021 13:09:56 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;&#160;first of all good point that 120 sec timeout is very likely good enough and there is nothing to do here from the point of view of thundering herd because the pending reads will not retry all at once. And yes, your description is correct.&#160;&lt;/p&gt;

&lt;p&gt;There is a second problem to consider - if the migration is already ongoing for several seconds it is very likely that it will succeed and the blocked read will fail anyway, and will have to be retried. From the user experience point of view - failing the read faster is the preferred outcome here. It makes sense waiting only if there is a considerable chance that the read will succeed, and soon.&lt;/p&gt;

&lt;p&gt;This should be considered as optimization to improve user experience, the existing code is correct.&lt;/p&gt;</comment>
                            <comment id="4044514" author="jesse" created="Wed, 8 Sep 2021 11:56:42 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andrew.shuvalov&quot; class=&quot;user-hover&quot; rel=&quot;andrew.shuvalov&quot;&gt;andrew.shuvalov&lt;/a&gt;&#160;can you explain in some more detail what the problem is, and how your proposed solution is better? Is the problem that the thundering herd at the end of migration is overwhelming on the recipient? Is the intention of your solution to temporally spread out the load on the recipient? When you say, &quot;we can actually try to process what we can in the meantime&quot;, do you mean reads with timestamps before the migration&apos;s &quot;block timestamp&quot;?&lt;/p&gt;</comment>
                            <comment id="3971477" author="jesse" created="Thu, 29 Jul 2021 19:17:51 +0000"  >&lt;p&gt;The non-configurable 120 seconds is standard for all drivers, see &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/transactions-convenient-api/transactions-convenient-api.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/transactions-convenient-api/transactions-convenient-api.rst&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When timeoutMS is configured it supersedes the 120 seconds: DRIVERS-555.&lt;/p&gt;</comment>
                            <comment id="3639364" author="esha.maharishi@10gen.com" created="Mon, 1 Mar 2021 14:12:57 +0000"  >&lt;p&gt;Note that drivers only retry even TransientTransactionError errors up to a certain limit, e.g. the &lt;a href=&quot;https://docs.mongodb.com/php-library/v1.5/reference/function/with_transaction/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;PHP driver retries for a (non-configurable) 120 seconds&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1628730">SERVER-54661</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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 1 Mar 2021 14:12:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 21 weeks, 6 days 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2335</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 21 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>jesse@mongodb.com</customfieldvalue>
            <customfieldvalue>andrew.shuvalov@mongodb.com</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hyx2xb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hyig47:</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_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|hywp6f:</customfieldvalue>

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