<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:24: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-51179] TenantMigrationDonorInstance should distinguish local and remote shutdown/stepdown errors</title>
                <link>https://jira.mongodb.org/browse/SERVER-51179</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, TenantMigrationDonorInstance&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/46b591bf2b003eee99f33a82a2027e98c1304560/src/mongo/db/repl/tenant_migration_donor_service.cpp#L68-L81&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;stops retrying on shutdown/stepdown errors&lt;/a&gt; regardless of if the error is local or remote.&lt;/p&gt;

&lt;p&gt;Once there is a way to distinguish local and remote errors, TenantMigrationDonorInstance should be updated to only stop retrying if the error is local.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Edit: We decided not to use the machinery being built for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50549&quot; title=&quot;Transform connection-related error codes in proxied commands&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50549&quot;&gt;&lt;del&gt;SERVER-50549&lt;/del&gt;&lt;/a&gt;. Instead, we can use the fact that an Instance has a&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/c6316be1df28838a51f257abae42f43083e72d25/src/mongo/db/repl/primary_only_service.h#L132&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;private _isRunning bool&lt;/a&gt; that gets set to true when the instance&apos;s run() is called.&lt;/p&gt;

&lt;p&gt;Right now the bool never gets set to false, but we can make PrimaryOnlyService::onStepdown and PrimaryOnlyService::shutdown iterate all instances in that service and set their _isRunning bools to false, similarly to how they &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c6316be1df28838a51f257abae42f43083e72d25/src/mongo/db/repl/primary_only_service.cpp#L398-L401&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;iterate their instances and call interrupt on them.&lt;/a&gt; (This does mean PrimaryOnlyService::Instance will need a member mutex to protect _isRunning.)&lt;/p&gt;

&lt;p&gt;We can add a protected `const isRunning()` method &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c6316be1df28838a51f257abae42f43083e72d25/src/mongo/db/repl/primary_only_service.h#L93&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;to PrimaryOnlyService::Instance&lt;/a&gt; that returns _isRunning.&lt;/p&gt;

&lt;p&gt;Then, an instance&apos;s retry loop can just keep retrying until `status.isOK() || !isRunning()` instead of &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c6316be1df28838a51f257abae42f43083e72d25/src/mongo/db/repl/tenant_migration_donor_service.cpp#L68-L81&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;checking if the status is a NotPrimary or Shutdown error&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1493437">SERVER-51179</key>
            <summary>TenantMigrationDonorInstance should distinguish local and remote shutdown/stepdown errors</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="jason.zhang@mongodb.com">Jason Zhang</assignee>
                                    <reporter username="esha.maharishi@mongodb.com">Esha Maharishi</reporter>
                        <labels>
                            <label>pm-1791_milestone-D</label>
                    </labels>
                <created>Mon, 28 Sep 2020 16:34:34 +0000</created>
                <updated>Sun, 29 Oct 2023 22:02:42 +0000</updated>
                            <resolved>Thu, 10 Dec 2020 22:34:09 +0000</resolved>
                                                    <fixVersion>4.9.0</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="3526103" author="xgen-internal-githook" created="Thu, 10 Dec 2020 22:26:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jason Zhang&apos;, &apos;email&apos;: &apos;jason.zhang@mongodb.com&apos;, &apos;username&apos;: &apos;jz1242&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-51179&quot; title=&quot;TenantMigrationDonorInstance should distinguish local and remote shutdown/stepdown errors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-51179&quot;&gt;&lt;del&gt;SERVER-51179&lt;/del&gt;&lt;/a&gt; TenantMigrationDonorInstance should distinguish local and remote shutdown/stepdown errors&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a8db11a72b4f5e838785019e030da05a4502a2ba&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a8db11a72b4f5e838785019e030da05a4502a2ba&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3421677" author="esha.maharishi@10gen.com" created="Thu, 1 Oct 2020 21:17:12 +0000"  >&lt;p&gt;Actually, given &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; is going actively working on integrating cancel tokens with POS and things like AsyncTry, we may as well just wait until he&apos;s done, so putting it back on the backlog.&lt;/p&gt;</comment>
                            <comment id="3419179" author="esha.maharishi@10gen.com" created="Wed, 30 Sep 2020 18:25:47 +0000"  >&lt;p&gt;Sounds good, let&apos;s go with Spencer&apos;s modification. This aligns it better with cancel tokens, which should eventually replace interrupt().&lt;/p&gt;</comment>
                            <comment id="3419153" author="spencer" created="Wed, 30 Sep 2020 18:14:02 +0000"  >&lt;p&gt;Rather than relying on the _running bool from the Instance base class, and have to add a mutex into the base class, I think we should just make Instance subclasses handle this themselves when their interrupt() method is called (or down the road, when their CancelToken is signaled)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="1453277">SERVER-50549</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1478488">SERVER-51012</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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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>Wed, 30 Sep 2020 18:14:02 +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[<s><a href='https://jira.mongodb.org/browse/SERVER-50549'>SERVER-50549</a></s>]]></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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jason.zhang@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hy942v:</customfieldvalue>

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

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