<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:15:18 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-70115] Resharding Coordinator and Recipient Persist Invalid Start/End Times to State Document</title>
                <link>https://jira.mongodb.org/browse/SERVER-70115</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The ReshardingCoordinatorService &lt;a href=&quot;https://github.com/10gen/mongo/blob/d1dde8caac01621a11ec5f1e768e172918c5421c/src/mongo/db/s/resharding/resharding_coordinator_service.cpp#L1925&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;persists&lt;/a&gt; the &lt;a href=&quot;https://github.com/10gen/mongo/blob/d1dde8caac01621a11ec5f1e768e172918c5421c/src/mongo/db/s/resharding/resharding_coordinator_service.cpp#L169&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;start and end times&lt;/a&gt; for phase transitions as part of its &lt;a href=&quot;https://github.com/10gen/mongo/blob/d1dde8caac01621a11ec5f1e768e172918c5421c/src/mongo/db/s/resharding/coordinator_document.idl#L76&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;state document&lt;/a&gt;. However, during phase transitions, the coordinator is &lt;a href=&quot;https://github.com/10gen/mongo/blob/d1dde8caac01621a11ec5f1e768e172918c5421c/src/mongo/db/s/resharding/resharding_coordinator_service.cpp#L1689&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;persisting these times&lt;/a&gt; before &lt;a href=&quot;https://github.com/10gen/mongo/blob/d1dde8caac01621a11ec5f1e768e172918c5421c/src/mongo/db/s/resharding/resharding_coordinator_service.cpp#L1694&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;setting them&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The ReshardingRecipeintService has a similar issue when transitioning to &lt;a href=&quot;https://github.com/10gen/mongo/blob/5f40051ccd887859a43bf0e456773759f5d93ddc/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L892&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;applying &lt;/a&gt; and &lt;a href=&quot;https://github.com/10gen/mongo/blob/5f40051ccd887859a43bf0e456773759f5d93ddc/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L902&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;strict consistency&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;It&apos;s worth noting that the recipient service will &lt;a href=&quot;https://github.com/10gen/mongo/blob/5f40051ccd887859a43bf0e456773759f5d93ddc/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L886&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;set the copying start time&lt;/a&gt; before writing this value to disk. However, this has the problem of leaving a potentially invalid start time in memory if persisting to disk fails.&lt;/p&gt;

&lt;p&gt;This issue affects the following functions involving state transitions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/10gen/mongo/blob/d1dde8caac01621a11ec5f1e768e172918c5421c/src/mongo/db/s/resharding/resharding_coordinator_service.cpp#L1689&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_awaitAllDonorsReadyToDonate()&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/10gen/mongo/blob/d1dde8caac01621a11ec5f1e768e172918c5421c/src/mongo/db/s/resharding/resharding_coordinator_service.cpp#L1711&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_awaitAllRecipientsFinishedCloning()&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/10gen/mongo/blob/d1dde8caac01621a11ec5f1e768e172918c5421c/src/mongo/db/s/resharding/resharding_coordinator_service.cpp#L1784&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_awaitAllRecipientsFinishedApplying()&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/10gen/mongo/blob/5f40051ccd887859a43bf0e456773759f5d93ddc/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L884&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_transitionToCloning()&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/10gen/mongo/blob/5f40051ccd887859a43bf0e456773759f5d93ddc/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L892&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_transitionToApplying()&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/10gen/mongo/blob/5f40051ccd887859a43bf0e456773759f5d93ddc/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L902&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_transitionToStrictConsistency()&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;For all of these functions, the timestamp for the start/end times should be chosen, written to disk, and then used to update the metrics in-memory.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2148292">SERVER-70115</key>
            <summary>Resharding Coordinator and Recipient Persist Invalid Start/End Times to State Document</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="adrian.gonzalez@mongodb.com">Adrian Gonzalez Montemayor</assignee>
                                    <reporter username="brett.nawrocki@mongodb.com">Brett Nawrocki</reporter>
                        <labels>
                            <label>sharding-nyc-subteam1</label>
                    </labels>
                <created>Thu, 29 Sep 2022 17:57:30 +0000</created>
                <updated>Sun, 29 Oct 2023 21:32:36 +0000</updated>
                            <resolved>Tue, 17 Jan 2023 21:35:48 +0000</resolved>
                                                    <fixVersion>6.3.0-rc0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5118956" author="xgen-internal-githook" created="Tue, 17 Jan 2023 21:16:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Adrian Gonzalez&apos;, &apos;email&apos;: &apos;adriangonzalezmontemayor@gmail.com&apos;, &apos;username&apos;: &apos;adriangzz&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-70115&quot; title=&quot;Resharding Coordinator and Recipient Persist Invalid Start/End Times to State Document&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-70115&quot;&gt;&lt;del&gt;SERVER-70115&lt;/del&gt;&lt;/a&gt; Resharding Coordinator and Recipient Persist Invalid Start/End Times to State Document&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2731779814f9de99958826c3aeca1ee93ece4743&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2731779814f9de99958826c3aeca1ee93ece4743&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4874106" author="max.hirschhorn@10gen.com" created="Mon, 3 Oct 2022 19:01:39 +0000"  >&lt;p&gt;Idea would be to add a struct containing boost::optional&amp;lt;Date&amp;#95;t&amp;gt; for each of the start and end times and use that in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/801e5203e0efcb62ffcef66e22da95d645b2dca2/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L847&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;RecipientStateMachine::&amp;#95;transitionState()&lt;/a&gt; and for &lt;a href=&quot;https://github.com/mongodb/mongo/blob/801e5203e0efcb62ffcef66e22da95d645b2dca2/src/mongo/db/s/resharding/resharding_coordinator_service.cpp#L187&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ReshardingCoordinator&apos;s writeToCoordinatorStateNss()&lt;/a&gt; to have set the individual start and end times to be non boost::none on the &lt;tt&gt;updatedCoordinatorDoc&lt;/tt&gt; and to have writeToCoordinatorStateNss() append to the &lt;tt&gt;setBuilder&lt;/tt&gt; to update the on&amp;#45;disk state.&lt;/p&gt;</comment>
                            <comment id="4866468" author="JIRAUSER1262262" created="Thu, 29 Sep 2022 18:53:52 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn@mongodb.com&quot;&gt;max.hirschhorn@mongodb.com&lt;/a&gt; Looking at this again, it actually seems like only in ReshardingRecipientService::RecipientStateMachine::_transitionToCloning do we do it in this way. I assumed it was being done in a consistent manner across state transitions.&lt;/p&gt;

&lt;p&gt;I think probably what we should really be doing is getting a timestamp, writing that down, and then updating the metrics with that timestamp for the reasons you mentioned. I&apos;ll rewrite the ticket.&lt;/p&gt;</comment>
                            <comment id="4866431" author="max.hirschhorn@10gen.com" created="Thu, 29 Sep 2022 18:47:12 +0000"  >&lt;blockquote&gt;
&lt;p&gt;These values should be set before they are written down, as is &lt;a href=&quot;https://github.com/10gen/mongo/blob/d1dde8caac01621a11ec5f1e768e172918c5421c/src/mongo/db/s/resharding/resharding_recipient_service.cpp#L884&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;already being done on the recipient&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The general rule we&apos;ve followed in resharding and in other server components is to only update the in&amp;#45;memory state after the on&amp;#45;disk state has been updated. This way we don&apos;t need to undo the update to the in&amp;#45;memory state if the write to the on&amp;#45;disk state fails. What was the motivation for doing the reverse with these resharding metrics?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2148174">SERVER-70111</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>5.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 29 Sep 2022 18:47:12 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 3 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_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, 3 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>20.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>adrian.gonzalez@mongodb.com</customfieldvalue>
            <customfieldvalue>brett.nawrocki@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1c847:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hraf50:ci</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="6350">Sharding 2022-10-17</customfieldvalue>
    <customfieldvalue id="6354">Sharding 2022-12-12</customfieldvalue>
    <customfieldvalue id="6355">Sharding NYC 2022-12-26</customfieldvalue>
    <customfieldvalue id="6356">Sharding NYC 2023-01-09</customfieldvalue>
    <customfieldvalue id="6865">Sharding NYC 2023-01-23</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|i1bu9j:</customfieldvalue>

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