<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:22:44 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-50467] Ensure that tenant migration donor only removes a ReplicaSetMonitor for a recipient when the last migration to that recipient completes</title>
                <link>https://jira.mongodb.org/browse/SERVER-50467</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-49789&quot; title=&quot;Make tenant migration donor use a StreamableReplicaSetMonitor to monitor and send commands to the recipient&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-49789&quot;&gt;&lt;del&gt;SERVER-49789&lt;/del&gt;&lt;/a&gt; made a TenantMigrationDonorService::Instance&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/f393c88a92010d406f063ca4fcc866f1988bf84d/src/mongo/db/repl/tenant_migration_donor_service.cpp#L422&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;create&lt;/a&gt; a RemoteCommandTargeterRS for the recipient replica set at the beginning of its run() and capture the targeter into all the continuations in its future chain (like &lt;a href=&quot;https://github.com/mongodb/mongo/blob/f393c88a92010d406f063ca4fcc866f1988bf84d/src/mongo/db/repl/tenant_migration_donor_service.cpp#L442&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;See that ticket&apos;s description for background.&lt;/p&gt;

&lt;p&gt;We handled destroying the donor&apos;s ReplicaSetMonitor for the recipient once the donor completed the migration by&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/f393c88a92010d406f063ca4fcc866f1988bf84d/src/mongo/db/repl/tenant_migration_donor_service.cpp#L426&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;calling ReplicaSetMonitor::remove&lt;/a&gt; in the RemoteCommandTargeterRS destructor.&lt;/p&gt;

&lt;p&gt;However, if the donor was migrating two tenants to the same recipient concurrently, the two migrations would be sharing the same ReplicaSetMonitor, and the first migration to finish would rip the ReplicaSetMonitor out from under the second migration.&lt;/p&gt;

&lt;p&gt;This ticket is to ensure the ReplicaSetMonitor is only removed when the ReplicasSetMonitor does not have any more users.&lt;/p&gt;

&lt;p&gt;There is already a commented-out test case for this &lt;a href=&quot;https://github.com/mongodb/mongo/blob/f831517ed6ee7e0b866229d45d2149bf23dece60/jstests/replsets/concurrent_tenant_migrations.js#L113&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1449283">SERVER-50467</key>
            <summary>Ensure that tenant migration donor only removes a ReplicaSetMonitor for a recipient when the last migration to that recipient completes</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="andrew.shuvalov@mongodb.com">Andrew Shuvalov</assignee>
                                    <reporter username="cheahuychou.mao@mongodb.com">Cheahuychou Mao</reporter>
                        <labels>
                            <label>pm-1791_milestone-D</label>
                    </labels>
                <created>Fri, 21 Aug 2020 20:05:03 +0000</created>
                <updated>Sun, 29 Oct 2023 22:04:08 +0000</updated>
                            <resolved>Tue, 8 Dec 2020 21:26:28 +0000</resolved>
                                                    <fixVersion>4.9.0-alpha0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3521581" author="xgen-internal-githook" created="Tue, 8 Dec 2020 21:23:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Shuvalov&apos;, &apos;email&apos;: &apos;andrew.shuvalov@mongodb.com&apos;, &apos;username&apos;: &apos;shuvalov-mdb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50467&quot; title=&quot;Ensure that tenant migration donor only removes a ReplicaSetMonitor for a recipient when the last migration to that recipient completes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50467&quot;&gt;&lt;del&gt;SERVER-50467&lt;/del&gt;&lt;/a&gt;: Added TODO &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-53276&quot; title=&quot;After tenant migration, recipient side RSM to donor is not garbage collected&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-53276&quot;&gt;&lt;del&gt;SERVER-53276&lt;/del&gt;&lt;/a&gt; to fix recipient side tenant migration RSM lifetime bug&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/987484b4aa34deea1db7d70228989b83448a24e8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/987484b4aa34deea1db7d70228989b83448a24e8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3520950" author="xgen-internal-githook" created="Tue, 8 Dec 2020 17:15:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Shuvalov&apos;, &apos;email&apos;: &apos;andrew.shuvalov@mongodb.com&apos;, &apos;username&apos;: &apos;shuvalov-mdb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50467&quot; title=&quot;Ensure that tenant migration donor only removes a ReplicaSetMonitor for a recipient when the last migration to that recipient completes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50467&quot;&gt;&lt;del&gt;SERVER-50467&lt;/del&gt;&lt;/a&gt;: Ensure that tenant migration donor only removes a ReplicaSetMonitor for a recipient when the last migration to that recipient completes&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f3a221e769527f1709dae21e832729da52af6e83&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f3a221e769527f1709dae21e832729da52af6e83&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3504503" author="xgen-internal-githook" created="Tue, 24 Nov 2020 22:24:23 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Shuvalov&apos;, &apos;email&apos;: &apos;andrew.shuvalov@mongodb.com&apos;, &apos;username&apos;: &apos;shuvalov-mdb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50467&quot; title=&quot;Ensure that tenant migration donor only removes a ReplicaSetMonitor for a recipient when the last migration to that recipient completes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50467&quot;&gt;&lt;del&gt;SERVER-50467&lt;/del&gt;&lt;/a&gt;: StreamableReplicaSetMonitor should call drop on itself from destructor&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c50282b539308d1578465fa0819e228a47d3421e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c50282b539308d1578465fa0819e228a47d3421e&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1507395">SERVER-51440</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1562610">SERVER-53276</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1429373">SERVER-50093</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1435687">SERVER-50189</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1505836">SERVER-51413</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.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, 23 Nov 2020 21:15:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 9 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_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, 9 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>17.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.shuvalov@mongodb.com</customfieldvalue>
            <customfieldvalue>cheahuychou.mao@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hy1lt3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr53ov:</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="4254">Sharding 2020-10-19</customfieldvalue>
    <customfieldvalue id="4255">Sharding 2020-11-02</customfieldvalue>
    <customfieldvalue id="4256">Sharding 2020-11-16</customfieldvalue>
    <customfieldvalue id="4257">Sharding 2020-11-30</customfieldvalue>
    <customfieldvalue id="4258">Sharding 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|hy182f:</customfieldvalue>

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