<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:53:08 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-61717] Ensure a POS instance remains in the POS map until the instance&apos;s run() is complete</title>
                <link>https://jira.mongodb.org/browse/SERVER-61717</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The original PrimaryOnlyService left it up to individual instances to insert and delete their state documents, but has an &lt;a href=&quot;https://github.com/mongodb/mongo/blob/69747b8e84b786706c9611ec00a60b7eda002fd3/src/mongo/db/repl/primary_only_service_op_observer.cpp#L76&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;op observer for removing an instance from the in-memory map when the state document is deleted&lt;/a&gt;. This means an instance can end up in a &quot;detached&quot; state where it can continue executing logic after deleting its state doc, but no longer be in the in-memory map. This, in combination to the way services are interrupted on stepdown and shutdown, has led to oddities like making commands that wait on an instance&apos;s completion future &lt;a href=&quot;https://github.com/mongodb/mongo/blob/348fd9169533326d1d034a1dc9c408ebf60c74ec/src/mongo/db/commands/tenant_migration_donor_cmds.cpp#L175&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;call OperationContext::setAlwaysInterruptAtStepDownOrUp&lt;/a&gt;. (If they didn&apos;t, the state doc could be deleted while the node is primary, then the instance gets removed from the in-memory map, then the node steps down and the instance doesn&apos;t get interrupted since it&apos;s no longer in the map but its further work &lt;em&gt;does&lt;/em&gt; get canceled since the scoped executor gets shut down, so the instance&apos;s completion promise is never fulfilled and the command would end up waiting forever.)&lt;/p&gt;

&lt;p&gt;This ticket is to instead remove the instance from the in-memory map only after the instance&apos;s run() has complete and remove the calls to OperationContext::setAlwaysInterruptAtStepDownOrUp.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1932481">SERVER-61717</key>
            <summary>Ensure a POS instance remains in the POS map until the instance&apos;s run() is complete</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="1" iconUrl="https://jira.mongodb.org/images/icons/statuses/open.png" description="">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="esha.maharishi@mongodb.com">Esha Maharishi</reporter>
                        <labels>
                            <label>ordered</label>
                    </labels>
                <created>Tue, 23 Nov 2021 22:44:19 +0000</created>
                <updated>Thu, 21 Sep 2023 17:24:25 +0000</updated>
                                                                                                <votes>1</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="5538044" author="jason.chan" created="Fri, 30 Jun 2023 20:51:23 +0000"  >&lt;p&gt;Setting this back to Open and depending on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69235&quot; title=&quot;Remove TTL index on tenant migration recipient state document namespace&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69235&quot;&gt;&lt;del&gt;SERVER-69235&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69236&quot; title=&quot;Remove TTL index on tenant migration donor state document namespace&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69236&quot;&gt;SERVER-69236&lt;/a&gt; in order to have an easier and more complete solution.&lt;/p&gt;</comment>
                            <comment id="4858903" author="jason.chan" created="Tue, 27 Sep 2022 16:02:07 +0000"  >&lt;p&gt;Putting back into Triage now that all dependencies are resolved.&lt;/p&gt;</comment>
                            <comment id="4858778" author="matt.broadstone" created="Tue, 27 Sep 2022 15:37:51 +0000"  >&lt;p&gt;This change is further motivated by the use case of ensuring instances are removed from memory if they complete before writing a state document. If an instance completes before the document is written (say, for some validation or conflict resolution), then we cannot depend on the opObserver to remove the instance, so the instance will remain in memory until a new primary steps up or the server shuts down. Ensuring instances are removed after their completion future becomes ready solves this problem. &lt;/p&gt;

&lt;p&gt;I&apos;ve linked &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56390&quot; title=&quot;Failed to construct ShardingDDLCoordinators do not get released&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56390&quot;&gt;&lt;del&gt;SERVER-56390&lt;/del&gt;&lt;/a&gt; which documents another place where we ran into this for the ShardingDDLCoordinators.&lt;/p&gt;</comment>
                            <comment id="4480204" author="esha.maharishi@10gen.com" created="Wed, 13 Apr 2022 14:27:59 +0000"  >&lt;p&gt;Marking as related to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-51650&quot; title=&quot;Primary-Only Service&amp;#39;s _rebuildCV should be notified even if stepdown happens quickly after stepup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-51650&quot;&gt;&lt;del&gt;SERVER-51650&lt;/del&gt;&lt;/a&gt;, since &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-51650&quot; title=&quot;Primary-Only Service&amp;#39;s _rebuildCV should be notified even if stepdown happens quickly after stepup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-51650&quot;&gt;&lt;del&gt;SERVER-51650&lt;/del&gt;&lt;/a&gt; is another reason callers will still need to call opCtx-&amp;gt;setAlwaysInterruptAtStepDownOrUp. We can&apos;t remove the calls to opCtx-&amp;gt;setAlwaysInterruptAtStepDownOrUp until (at least) both this ticket and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-51650&quot; title=&quot;Primary-Only Service&amp;#39;s _rebuildCV should be notified even if stepdown happens quickly after stepup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-51650&quot;&gt;&lt;del&gt;SERVER-51650&lt;/del&gt;&lt;/a&gt; are done.&lt;/p&gt;</comment>
                            <comment id="4455680" author="esha.maharishi@10gen.com" created="Mon, 4 Apr 2022 18:09:55 +0000"  >&lt;p&gt;Created &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-65236&quot; title=&quot;Make tenant migration donor delete its state doc in its run method&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-65236&quot;&gt;&lt;del&gt;SERVER-65236&lt;/del&gt;&lt;/a&gt; for making the tenant migration donor delete its state doc in its future chain rather than via a TTL index.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-67372&quot; title=&quot;Make tenant migration recipient delete its state document in its run method&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-67372&quot;&gt;&lt;del&gt;SERVER-67372&lt;/del&gt;&lt;/a&gt; will make the tenant migration recipient do the same.&lt;/p&gt;</comment>
                            <comment id="4215356" author="esha.maharishi@10gen.com" created="Mon, 29 Nov 2021 18:31:30 +0000"  >&lt;p&gt;One complication is that the tenant migration donor and recipient use a TTL index to delete their state docs (the instance&apos;s run() just sets the expireAt on the instance&apos;s state doc). However, an instance should remain in the in-memory map until its state doc is removed, so that getOrCreateInstance() can just check the in-memory map for a matching instance.&lt;/p&gt;

&lt;p&gt;It might be simpler if we don&apos;t use a TTL index, and instead the instance&apos;s run() includes waiting for the state doc to expire and deleting the state doc.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="2124694">SERVER-69236</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2016366">SERVER-65236</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2071823">SERVER-67372</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2071824">SERVER-67373</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2124689">SERVER-69235</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1515354">SERVER-51650</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2141550">SERVER-69835</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2043397">SERVER-66351</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2023125">SERVER-65478</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1692987">SERVER-56390</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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25132"><![CDATA[Service Arch]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 10 Mar 2022 17:01:48 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        31 weeks, 5 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-65236'>SERVER-65236</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-67372'>SERVER-67372</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-67373'>SERVER-67373</a></s>, <a href='https://jira.mongodb.org/browse/SERVER-69236'>SERVER-69236</a>, <s><a href='https://jira.mongodb.org/browse/SERVER-69235'>SERVER-69235</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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2660</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>jason.chan@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            31 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-servicearch</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>jason.chan@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.broadstone@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0bhsv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0zc9b:w</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="6303">Service Arch 2022-07-11</customfieldvalue>
    <customfieldvalue id="6578">Service Arch 2022-11-28</customfieldvalue>
    <customfieldvalue id="6747">Service Arch 2023-01-09</customfieldvalue>
    <customfieldvalue id="6748">Service Arch 2023-01-23</customfieldvalue>
    <customfieldvalue id="6749">Service Arch 2023-02-06</customfieldvalue>
    <customfieldvalue id="6750">Service Arch 2023-02-20</customfieldvalue>
    <customfieldvalue id="6751">Service Arch 2023-03-06</customfieldvalue>
    <customfieldvalue id="6752">Service Arch 2023-03-20</customfieldvalue>
    <customfieldvalue id="6753">Service Arch 2023-04-03</customfieldvalue>
    <customfieldvalue id="7281">Service Arch 2023-04-17</customfieldvalue>
    <customfieldvalue id="7348">Service Arch 2023-05-01</customfieldvalue>
    <customfieldvalue id="7349">Service Arch 2023-05-15</customfieldvalue>
    <customfieldvalue id="7350">Service Arch 2023-05-29</customfieldvalue>
    <customfieldvalue id="7351">Service Arch 2023-06-12</customfieldvalue>
    <customfieldvalue id="7352">Service Arch 2023-06-26</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|i0b3y7:</customfieldvalue>

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