<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:43: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-57990] Make ReshardingDonorServiceTest and ReshardingRecipientServiceTest stepdown test cases more realistic</title>
                <link>https://jira.mongodb.org/browse/SERVER-57990</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e866ed8e645c034d773bc9de6dd4ec13ee769bea/src/mongo/db/s/resharding/resharding_donor_service_test.cpp#L319&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;resharding_donor_service_test.cpp&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d378bdd1e6b8e170aabb8f4f089b74481ed0bf1a/src/mongo/db/s/resharding/resharding_recipient_service_test.cpp#L346&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;resharding_recipient_service_test.cpp&lt;/a&gt; have stepdown tests that rely on mocking the coordinator&apos;s state changes to make progress.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Issue&lt;/b&gt;: The loop iterating over which states to pause and then stepdown upon mocks incorrect behavior - it can mock a coordinator&apos;s transition to kBlockingWrites before the donor itself is in kDonatingOplogEntries.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;br/&gt;
. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e866ed8e645c034d773bc9de6dd4ec13ee769bea/src/mongo/db/s/resharding/resharding_donor_service_test.cpp#L339&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;state&lt;/a&gt; = DonorStateEnum::kDonatingOplogEntries&#160; in the test loop&lt;/p&gt;

&lt;p&gt;. at the start of this iteration, ReshardingDonorDocument.state = kDonatingInitialData on disk&lt;/p&gt;

&lt;p&gt;. the test &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e866ed8e645c034d773bc9de6dd4ec13ee769bea/src/mongo/db/s/resharding/resharding_donor_service_test.cpp#L364&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mocks the coordinator&apos;s transition into kApplying&lt;/a&gt;&lt;br/&gt;
. the donor finishes up all the necessary work and is ready to transition to &apos;state&apos; kDonatingOplogEntries&lt;/p&gt;

&lt;p&gt;. the test &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e866ed8e645c034d773bc9de6dd4ec13ee769bea/src/mongo/db/s/resharding/resharding_donor_service_test.cpp#L380&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;waits&lt;/a&gt; until the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d378bdd1e6b8e170aabb8f4f089b74481ed0bf1a/src/mongo/db/s/resharding/resharding_service_test_helpers.cpp#L138&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;OpObserverForTest::onUpdate&lt;/a&gt; witnesses attempt to transition to kDonatingOplogEntries&lt;br/&gt;
. the test calls stepDown, causing the OpObserverForTest::onUpdate to throw when the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d378bdd1e6b8e170aabb8f4f089b74481ed0bf1a/src/mongo/db/s/resharding/resharding_service_test_helpers.cpp#L72&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;opCtx is interrupted&lt;/a&gt;&#160;and the write ReshardingDonorDocument.state = kDonatingOplogEntries fails&lt;/p&gt;

&lt;p&gt;&#160;. (next iteration) &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e866ed8e645c034d773bc9de6dd4ec13ee769bea/src/mongo/db/s/resharding/resharding_donor_service_test.cpp#L339&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;state&lt;/a&gt; = DonorStateEnum::kBlockingWrites, but ReshardingDonorDocument.state = kDonatingInitialData still&lt;br/&gt;
. The test mocks the coordinator&apos;s transition to kBlockingWrites, before the donor is in kDonatingOplogEntries, which is illegal in the real system&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;br/&gt;
We want to preserve the behavior that the stepdown occurs&#160;&lt;b&gt;before&lt;/b&gt; the participant persists its new state to its local ReshardingDocument.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1793751">SERVER-57990</key>
            <summary>Make ReshardingDonorServiceTest and ReshardingRecipientServiceTest stepdown test cases more realistic</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-cluster-scalability">Backlog - Cluster Scalability</assignee>
                                    <reporter username="haley.connelly@mongodb.com">Haley Connelly</reporter>
                        <labels>
                            <label>PM-234</label>
                            <label>cs-subteam1</label>
                            <label>sharding-nyc-subteam1</label>
                    </labels>
                <created>Tue, 22 Jun 2021 21:08:59 +0000</created>
                <updated>Tue, 12 Dec 2023 17:04:25 +0000</updated>
                                                                            <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                        <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26583"><![CDATA[Cluster Scalability]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 33 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_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>r.scott@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 33 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-cluster-scalability</customfieldvalue>
            <customfieldvalue>haley.connelly@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hznzzz:</customfieldvalue>

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

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