<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:09:23 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-67916] Race during stepdown can trigger invariant in ReshardingMetrics</title>
                <link>https://jira.mongodb.org/browse/SERVER-67916</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When a step down occurs the recipient tries to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r6.0.0/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L364&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;wait for the _dataReplicationQuiesced future&lt;/a&gt; before &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r6.0.0/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L371&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;deactivating the metrics state&lt;/a&gt;. That future is a composite of &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r6.0.0/src/mongo/db/s/resharding/resharding_data_replication.cpp#L316&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;multiple futures&lt;/a&gt; and when any of the futures error out it would normally try to join them &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r6.0.0/src/mongo/db/s/resharding/resharding_future_util.cpp#L62&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. The issue is that during step down, the primary only service also shuts down the executor so the executor would refuse to run the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r6.0.0/src/mongo/db/s/resharding/resharding_future_util.cpp#L59&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;onError&lt;/a&gt; and it would end up finishing the future chain without waiting for the other futures to complete.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2085911">SERVER-67916</key>
            <summary>Race during stepdown can trigger invariant in ReshardingMetrics</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="brett.nawrocki@mongodb.com">Brett Nawrocki</assignee>
                                    <reporter username="randolph@mongodb.com">Randolph Tan</reporter>
                        <labels>
                            <label>sharding-nyc-subteam1</label>
                    </labels>
                <created>Fri, 8 Jul 2022 17:36:53 +0000</created>
                <updated>Sun, 29 Oct 2023 21:35:48 +0000</updated>
                            <resolved>Thu, 18 Aug 2022 14:43:33 +0000</resolved>
                                    <version>5.0.9</version>
                    <version>6.0.0-rc13</version>
                                    <fixVersion>5.0.13</fixVersion>
                    <fixVersion>6.0.2</fixVersion>
                    <fixVersion>6.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4826907" author="xgen-internal-githook" created="Wed, 14 Sep 2022 18:05:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Brett Nawrocki&apos;, &apos;email&apos;: &apos;brett.nawrocki@mongodb.com&apos;, &apos;username&apos;: &apos;brettnawrocki&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-67916&quot; title=&quot;Race during stepdown can trigger invariant in ReshardingMetrics&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-67916&quot;&gt;&lt;del&gt;SERVER-67916&lt;/del&gt;&lt;/a&gt; Fix semantics of cancelWhenAnyErrorThenQuiesce&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 8ea624563847736c94f0e500d3097557ab4d8315)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d711d9362842c971f36c4b14ab75488dc345700a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d711d9362842c971f36c4b14ab75488dc345700a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4823874" author="xgen-internal-githook" created="Tue, 13 Sep 2022 20:17:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Brett Nawrocki&apos;, &apos;email&apos;: &apos;brett.nawrocki@mongodb.com&apos;, &apos;username&apos;: &apos;brettnawrocki&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-67916&quot; title=&quot;Race during stepdown can trigger invariant in ReshardingMetrics&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-67916&quot;&gt;&lt;del&gt;SERVER-67916&lt;/del&gt;&lt;/a&gt; Fix semantics of cancelWhenAnyErrorThenQuiesce&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 8ea624563847736c94f0e500d3097557ab4d8315)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/fdf878f2d224ac2786fff8bafe003c2ef4cb5b1b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/fdf878f2d224ac2786fff8bafe003c2ef4cb5b1b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4795022" author="max.hirschhorn@10gen.com" created="Thu, 1 Sep 2022 13:53:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Brett Nawrocki&apos;, &apos;email&apos;: &apos;brett.nawrocki@mongodb.com&apos;, &apos;username&apos;: &apos;brettnawrocki&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-67916&quot; title=&quot;Race during stepdown can trigger invariant in ReshardingMetrics&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-67916&quot;&gt;&lt;del&gt;SERVER-67916&lt;/del&gt;&lt;/a&gt; Fix semantics of cancelWhenAnyErrorThenQuiesce&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8ea624563847736c94f0e500d3097557ab4d8315&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8ea624563847736c94f0e500d3097557ab4d8315&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4703146" author="max.hirschhorn@10gen.com" created="Mon, 25 Jul 2022 18:49:17 +0000"  >&lt;p&gt;Implementation plan is to add the &lt;tt&gt;cleanupExecutor&lt;/tt&gt; into the resharding::cancelWhenAnyErrorThenQuiesce() for where the continuations run. The cleanup executor for primary&amp;#45;only service Instances isn&apos;t shut down until all of the Instances have returned a ready future from their run() method so should still be available to run the onError() continuation in resharding::cancelWhenAnyErrorThenQuiesce().&lt;/p&gt;</comment>
                            <comment id="4676573" author="renctan" created="Wed, 13 Jul 2022 14:17:41 +0000"  >&lt;p&gt;Notes: shutdown is also called on the primary only service executor from repl coordinator shutdown.&lt;/p&gt;</comment>
                            <comment id="4666851" author="renctan" created="Fri, 8 Jul 2022 17:38:38 +0000"  >&lt;p&gt;Note: This is no longer a problem in latest code due to the refactoring work done on resharding metrics.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </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>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23470"><![CDATA[v6.0]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.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, 25 Jul 2022 18:49:17 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>brett.nawrocki@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i11k93:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hraf50:d</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6346">Sharding 2022-08-22</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Running test_resharding_test_fixture_shutdown_retry_needed.js can reproduce this bug intermittently. Adding a sleep before this &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r6.0.0/src/mongo/db/s/resharding/resharding_collection_cloner.cpp#L271&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;line&lt;/a&gt; helps in increasing the chances of reproducing the issue, but still not reliable enough.&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</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|i116ef:</customfieldvalue>

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