<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:11: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-68783] Recipient shard may incorrectly return 0 milliseconds remaining in resharding</title>
                <link>https://jira.mongodb.org/browse/SERVER-68783</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In response to a _shardsvrReshardingOperationTime command (used for querying the estimated remaining time in a resharding operation) from the resharding coordinator, a recipient shard executes &lt;a href=&quot;https://github.com/10gen/mongo/blob/01eb71c/src/mongo/db/s/shardsvr_resharding_operation_time_command.cpp#L120&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; code, which calls &lt;a href=&quot;https://github.com/10gen/mongo/blob/master/src/mongo/db/s/resharding/resharding_metrics.cpp#L136&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ReshardingMetrics::getRecipientHighEstimateRemainingTimeMillis&lt;/a&gt; to compute the estimate of the remaining time.&#160; That function may return 0 incorrectly if the shard has just had a failover, and not yet restored all of the metrics.&#160; &#160;That can happen because the metrics are only partly restored &lt;a href=&quot;https://github.com/10gen/mongo/blob/eda2f5d/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L196&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and partly restored &lt;a href=&quot;https://github.com/10gen/mongo/blob/eda2f5d/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L1236&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;&#160;&lt;/p&gt;

&lt;p&gt;As a result, if a _shardsvrReshardingOperationTime command enters the system at the wrong time, it may observe only partly restored metrics, and the coordinator would be misled into believing that it can begin the critical section.&lt;/p&gt;

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

&lt;p&gt;This is related to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-67653&quot; title=&quot;Resharding coordinator can incorrectly conclude that it can start the critical section although on one recipient the oplog applier hasn&amp;#39;t caught up with the oplog fetcher&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-67653&quot;&gt;&lt;del&gt;SERVER-67653&lt;/del&gt;&lt;/a&gt;, but is not the same because in that ticket the coordinator incorrectly treats an omitted remainingMillis field as 0 remainingMillis.&#160; In this ticket, the recipient incorrectly returns 0 remainingMillis.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2112370">SERVER-68783</key>
            <summary>Recipient shard may incorrectly return 0 milliseconds remaining in resharding</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="andrew.witten@mongodb.com">Andrew Witten</reporter>
                        <labels>
                            <label>sharding-nyc-subteam1</label>
                    </labels>
                <created>Fri, 12 Aug 2022 13:09:33 +0000</created>
                <updated>Sun, 29 Oct 2023 21:34:34 +0000</updated>
                            <resolved>Thu, 1 Sep 2022 17:52:30 +0000</resolved>
                                                    <fixVersion>6.1.0-rc2</fixVersion>
                    <fixVersion>6.2.0-rc0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="4823638" author="xgen-internal-githook" created="Tue, 13 Sep 2022 19:05:15 +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-68783&quot; title=&quot;Recipient shard may incorrectly return 0 milliseconds remaining in resharding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-68783&quot;&gt;&lt;del&gt;SERVER-68783&lt;/del&gt;&lt;/a&gt; Disambiguate 0 time estimate from no estimate in resharding&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 54dfa66ba84af002a0b43d2b7f49e0a8119f6c55)&lt;br/&gt;
Branch: v6.1&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f0aa22b7dd7277b5d2546574e6d9ac4fd27cc7b4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f0aa22b7dd7277b5d2546574e6d9ac4fd27cc7b4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4795701" author="xgen-internal-githook" created="Thu, 1 Sep 2022 16:33:56 +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-68783&quot; title=&quot;Recipient shard may incorrectly return 0 milliseconds remaining in resharding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-68783&quot;&gt;&lt;del&gt;SERVER-68783&lt;/del&gt;&lt;/a&gt; Disambiguate 0 time estimate from no estimate in resharding&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/54dfa66ba84af002a0b43d2b7f49e0a8119f6c55&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/54dfa66ba84af002a0b43d2b7f49e0a8119f6c55&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4747064" author="JIRAUSER1253381" created="Fri, 12 Aug 2022 15:43:15 +0000"  >&lt;p&gt;I don&apos;t think we should return Milliseconds(0) from &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1f93d126c0e83ca6de5dfa08648b1f61e90b04e1/src/mongo/db/s/resharding/resharding_metrics.cpp#L127&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; function because 0 is a valid return value for remainingMillis that the coordinator will interpret as 0.&lt;/p&gt;

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

&lt;p&gt;The question is this: when we return boost::none from &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1f93d126c0e83ca6de5dfa08648b1f61e90b04e1/src/mongo/db/s/resharding/resharding_metrics.cpp#L128&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; call, did we mean to return Milliseconds(0) (that is currently the effect of the code)?&#160; The failover case is a case where we did not mean to return 0.&#160; If there are other cases where we did not mean to return 0, those are bugs as currently implemented.&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">
                                        <issuelink>
            <issuekey id="2127745">COMPASS-6094</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="2127742">DOCS-15602</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2079749">SERVER-67653</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2147524">SERVER-70079</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="24444"><![CDATA[v6.1]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 30 Aug 2022 20:51:06 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 21 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_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Previously, a resharding operation would report that its estimated time remaining is 0 if either 1. the operation is very close to finishing or 2. an estimate could not be computed. Now, a value of 0 will only be reported in the former case. The visible effects of this change are as follows:&lt;br/&gt;
&lt;br/&gt;
1. In the $currentOp output for a resharding operation, the remainingOperationTimeEstimatedSecs field may not be present if an estimate could not be computed. Previously, this field would always be present, and have a value of 0 if the estimate could not be computed.&lt;br/&gt;
&lt;br/&gt;
2. In the serverStatus output, the shardingStatistics.resharding.coordinatorAllShardsLowestRemainingOperationTimeEstimatedMillis, shardingStatistics.resharding.coordinatorAllShardsHighestRemainingOperationTimeEstimatedMillis, and shardingStatistics.resharding.recipientRemainingOperationTimeEstimatedMillis fields will report a value of -1 if an estimate could not be computed. Previously, these fields would report a value of 0 in this case.</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16942"><![CDATA[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, 1 day ago
                        </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>andrew.witten@mongodb.com</customfieldvalue>
            <customfieldvalue>brett.nawrocki@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|i162nz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrfs71:ri</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>
    <customfieldvalue id="6347">Sharding 2022-09-05</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_17051" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Teams Impacted</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16943"><![CDATA[Cloud]]></customfieldvalue>
    <customfieldvalue key="16944"><![CDATA[Docs]]></customfieldvalue>
    <customfieldvalue key="20960"><![CDATA[DBX: DevTools (Compass, Shell, VS Code Ext)]]></customfieldvalue>
    <customfieldvalue key="16946"><![CDATA[Triage and Release]]></customfieldvalue>
    <customfieldvalue key="20958"><![CDATA[Atlas Data Federation and Data Lake]]></customfieldvalue>
    <customfieldvalue key="20961"><![CDATA[SQL Engines (Atlas SQL + BIC)]]></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|i15otb:</customfieldvalue>

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