<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:29:50 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-53070] Allow back to back tenant migrations for retries</title>
                <link>https://jira.mongodb.org/browse/SERVER-53070</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I think we agree that:&lt;br/&gt;
 &#160;&lt;br/&gt;
 If a donorStartMigration encounters a conflicting migration that is &lt;b&gt;not yet marked as garbage collectable&lt;/b&gt;, the donorStartMigration should fail.&lt;br/&gt;
 &#160;&lt;br/&gt;
 The question is what to do for:&lt;br/&gt;
 &#160;&lt;br/&gt;
 If the donorStartMigration encounters a conflicting migration that is &lt;b&gt;marked as garbage collectable.&lt;/b&gt;&lt;br/&gt;
 &#160;&lt;br/&gt;
 I think the options are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The donorStartMigration should fail (current).&lt;/li&gt;
	&lt;li&gt;The donorStartMigration should immediately garbage collect the old migration and start the new one.
	&lt;ul&gt;
		&lt;li&gt;If the new migration has a &lt;b&gt;different migrationId&lt;/b&gt; but is for the &lt;b&gt;same tenant&lt;/b&gt;:
		&lt;ul&gt;
			&lt;li&gt;A delayed donorStartMigration from the first migration will get ConflictingOperationInProgress, which should be harmless, since Cloud shouldn&apos;t care about the response anymore.&lt;/li&gt;
			&lt;li&gt;A delayed donorForgetMigration from the first migration will &lt;a href=&quot;https://github.com/mongodb/mongo/blob/045dd7a5857aa1b34d6fd1d2f6e3e29900010749/src/mongo/db/commands/tenant_migration_donor_cmds.cpp#L147&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;get NoSuchTenantMigration&lt;/a&gt;, which should also be harmless, since Cloud shouldn&apos;t care about the response anymore.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;If the new migration has the &lt;b&gt;same migrationId&lt;/b&gt; but is for a &lt;b&gt;different tenant:&lt;/b&gt;
		&lt;ul&gt;
			&lt;li&gt;This is not a legal thing for Cloud to do, so we can say the behavior is undefined.&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;Allow donorForgetMigration to take a&#160; &quot;garbageCollectImmediately: true&quot; flag that Cloud should use if they want to retry a migration quickly.
	&lt;ul&gt;
		&lt;li&gt;This is only best-effort, since it&apos;s possible for donorForgetMigration to garbage collect the state, then a delayed retry of the first donorStartMigration to restart the first migration, then Cloud tries to start the second migration and the second migration still fails since there&apos;s a conflicting active migration.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I think the second option is most practical, since it&apos;s the least amount of work for Cloud and has harmless side-effects.&lt;/p&gt;

&lt;p&gt;EDIT:&lt;br/&gt;
In the end, we decided to remove the TenantMigrationAccessBlocker entry when we mark an aborted migration document as garbage collectable. In the second option, if we immediately garbage collect the old state doc and insert the new one, then it would be a problem if donor fails over in between. In that case, we could lose the old state doc without inserting the new one. If a delayed donorStartMigration from the first migration then comes in, we could mistakenly start a migration. So the property we are maintaining instead is &quot;aborted garbage collectable documents do not have a TenantMigrationAccessBlocker entry&quot;. To maintain this property, we need to:&lt;br/&gt;
1. remove the mtab entry when we mark an aborted document as garbage collectable.&lt;br/&gt;
2. avoid creating the mtab entry for aborted garbage collectable documents when recovering mtabs from startup/rollback.&lt;br/&gt;
3. remove the op observer onDelete code that deletes the mtab entry for aborted state doc since this entry will have already been deleted.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1551191">SERVER-53070</key>
            <summary>Allow back to back tenant migrations for retries</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="vishnu.kaushik@mongodb.com">Vishnu Kaushik</assignee>
                                    <reporter username="judah.schvimer@mongodb.com">Judah Schvimer</reporter>
                        <labels>
                            <label>pm-1791_milestone-D</label>
                    </labels>
                <created>Tue, 24 Nov 2020 19:15:17 +0000</created>
                <updated>Sun, 29 Oct 2023 22:00:02 +0000</updated>
                            <resolved>Fri, 11 Dec 2020 15:39:11 +0000</resolved>
                                                    <fixVersion>4.9.0</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3526213" author="xgen-internal-githook" created="Thu, 10 Dec 2020 23:52:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Vishnu Kaushik&apos;, &apos;email&apos;: &apos;vishnu.kaushik@mongodb.com&apos;, &apos;username&apos;: &apos;kauboy26&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-53070&quot; title=&quot;Allow back to back tenant migrations for retries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-53070&quot;&gt;&lt;del&gt;SERVER-53070&lt;/del&gt;&lt;/a&gt; Allow back to back tenant migrations for retries&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3ade1b6edcf2c4c21c0ad0fccfeb6f292baa9d1a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3ade1b6edcf2c4c21c0ad0fccfeb6f292baa9d1a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3521145" author="vishnu.kaushik" created="Tue, 8 Dec 2020 18:28:30 +0000"  >&lt;p&gt;Just thought the final approach that was taken should be documented - &lt;br/&gt;
In the end, we decided to remove the TenantMigrationAccessBlocker entry when we mark an aborted migration document as garbage collectable. I guess roughly put, the property we are maintaining is &quot;aborted garbage collectable documents do not have a TenMigrationAccessBlocker entry&quot;. To maintain this property, we need to:&lt;br/&gt;
1. remove the mtab entry when we mark an aborted document as garbage collectable.&lt;br/&gt;
2. avoid creating the mtab entry for aborted garbage collectable documents when recovering mtabs.&lt;br/&gt;
3. remove the op observer onDelete code that deletes the mtab entry since this entry will have already been deleted.&lt;/p&gt;</comment>
                            <comment id="3508716" author="lingzhi.deng" created="Mon, 30 Nov 2020 17:17:27 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vishnu.kaushik&quot; class=&quot;user-hover&quot; rel=&quot;vishnu.kaushik&quot;&gt;vishnu.kaushik&lt;/a&gt;&#160;will implement the second option to&#160;immediately delete the old state doc&#160;if the donorStartMigration encounters a conflicting state doc that is marked as garbage collectable.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1558646">SERVER-53220</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 30 Nov 2020 17:17:27 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 8 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1791</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>luke.bonanomi@mongodb.com</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>lingzhi.deng@mongodb.com</customfieldvalue>
            <customfieldvalue>vishnu.kaushik@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hyix7b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hy4dzb:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="4474">Repl 2020-12-14</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|hyijgn:</customfieldvalue>

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