<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:58:15 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-41625] RollbackTest fixture runs data consistency checks twice when it stops</title>
                <link>https://jira.mongodb.org/browse/SERVER-41625</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The RollbackTest fixture &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0855ca379139f59a73276c0d2b24e9c47147b897/jstests/replsets/libs/rollback_test.js#L377&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;runs&lt;/a&gt; replica set data consistency checks explicitly inside its &lt;tt&gt;stop()&lt;/tt&gt; method. We subsequently &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0855ca379139f59a73276c0d2b24e9c47147b897/jstests/replsets/libs/rollback_test.js#L379&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;call&lt;/a&gt; &lt;tt&gt;stopSet&lt;/tt&gt; on the underlying ReplSetTest used by the RollbackTest. Since the completion of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-25640&quot; title=&quot;Have ReplSetTest run checkDBHashes() in stopSet()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-25640&quot;&gt;&lt;del&gt;SERVER-25640&lt;/del&gt;&lt;/a&gt;, we will run data consistency checks by default &lt;a href=&quot;https://github.com/mongodb/mongo/blob/b205efb00fd6e9ce27646070e934983384e8c0e2/src/mongo/shell/replsettest.js#L2508-L2513&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;inside&lt;/a&gt; &lt;tt&gt;stopSet&lt;/tt&gt;. This causes us to run data consistency checks twice when stopping an instance of RollbackTest. These extra checks are redundant and can slow down test execution. We can likely remove the extra data consistency check in &lt;tt&gt;RollbackTest.stop()&lt;/tt&gt; and rely on the checks done by &lt;tt&gt;ReplSetStep.stopSet()&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="795825">SERVER-41625</key>
            <summary>RollbackTest fixture runs data consistency checks twice when it stops</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="ryan.timmons@mongodb.com">Ryan Timmons</assignee>
                                    <reporter username="william.schultz@mongodb.com">William Schultz</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Jun 2019 23:07:07 +0000</created>
                <updated>Sun, 29 Oct 2023 22:20:08 +0000</updated>
                            <resolved>Mon, 27 Jan 2020 18:04:52 +0000</resolved>
                                                    <fixVersion>4.3.4</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2766074" author="xgen-internal-githook" created="Mon, 27 Jan 2020 17:48:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;ryan.timmons@mongodb.com&apos;, &apos;username&apos;: &apos;rtimmons&apos;, &apos;name&apos;: &apos;Ryan Timmons&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41625&quot; title=&quot;RollbackTest fixture runs data consistency checks twice when it stops&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41625&quot;&gt;&lt;del&gt;SERVER-41625&lt;/del&gt;&lt;/a&gt; RollbackTest fixture runs data consistency checks twice when it stops&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3edb43edb035799a599bde09acd4006715987e5a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3edb43edb035799a599bde09acd4006715987e5a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2724974" author="william.schultz" created="Tue, 14 Jan 2020 18:42:32 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ryan.timmons&quot; class=&quot;user-hover&quot; rel=&quot;ryan.timmons&quot;&gt;ryan.timmons&lt;/a&gt; In a standard usage of RollbackTest, where we go through all the normal state transitions, we will do consistency checks 3 times: (1) when we call transitionToSteadyStateOperations(), (2) when we call RollbackTest.stop, and (3) when we call ReplSetTest.stopSet from inside RollbackTest.stop. Ideally, we want to only have 1 set of consistency checks. I think that the consistency checks inside &apos;ReplSetTest.stopSet&apos; are always redundant, since we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/02ce213b40c56096c9c57e093778b0889c335bb9/jstests/replsets/libs/rollback_test.js#L471&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;directly call&lt;/a&gt; &apos;checkDataConsistency&apos; immediately before. So, we can always skip the stopSet consistency checks. You can do this by setting &lt;tt&gt;jsTest.options().skipCheckDBHashes&lt;/tt&gt;, but it might be simpler to just add another argument to the stopSet function that allows you to bypass consistency checks, so that we don&apos;t have to change those global settings for a single function call.&lt;/p&gt;

&lt;p&gt;To combine checks (1) and (2), I think it would make sense to record whether we already checked data consistency inside &apos;transitionToSteadyStateOperations()&apos;. We should always call RollbackTest.stop when ending a test, but, as you pointed out, we may not always call transitionToSteadyStateOperations(), and even if we do, we may &lt;a href=&quot;https://github.com/mongodb/mongo/blob/134a4083953270e8a11430395357fb70a29047ad/jstests/replsets/prepare_failover_rollback_commit.js#L57&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;skip consistency checks&lt;/a&gt; there. Once we reach RollbackTest.stop, we can see if consistency checks were already executed previously, inside transitionToSteadyStateOperations(). If they were, then we don&apos;t need to do any consistency checks. If they weren&apos;t, then we can do one set of consistency checks.&lt;/p&gt;

&lt;p&gt;To summarize, we would always skip the ReplSetTest.stopSet consistency checks, and only do consistency checks inside RollbackTest.stop if we didn&apos;t already do them inside transitionToSteadyStateOperations(). Also note that the &apos;checkDataConsistency&apos; function is slightly more thorough than the consistency checks inside ReplSetTest.stopSet, since we also explicitly &lt;a href=&quot;https://github.com/mongodb/mongo/blob/02ce213b40c56096c9c57e093778b0889c335bb9/jstests/replsets/libs/rollback_test.js#L217&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;check collection counts&lt;/a&gt; there.&lt;/p&gt;</comment>
                            <comment id="2279527" author="william.schultz" created="Tue, 11 Jun 2019 14:42:19 +0000"  >&lt;p&gt;To amend the original description, I believe that we actually do &lt;em&gt;3&lt;/em&gt; data consistency checks in tests that use the RollbackTest in the standard way. This is because there is another &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0855ca379139f59a73276c0d2b24e9c47147b897/jstests/replsets/libs/rollback_test.js#L249-L256&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;call&lt;/a&gt; to &lt;tt&gt;RollbackTest.checkDataConsistency()&lt;/tt&gt; inside &lt;tt&gt;transitionToSteadyStateOperations&lt;/tt&gt;, which is always called when going through the normal rollback test sequence.&lt;/p&gt;</comment>
                            <comment id="2279513" author="william.schultz" created="Tue, 11 Jun 2019 14:37:25 +0000"  >&lt;p&gt;Note that the &lt;tt&gt;RollbackTest.checkDataConsistency&lt;/tt&gt; appears to do &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0855ca379139f59a73276c0d2b24e9c47147b897/jstests/replsets/libs/rollback_test.js#L174-L176&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;one more check&lt;/a&gt; than ReplSetTest.stopSet, which is &lt;tt&gt;validateNodes&lt;/tt&gt;. ReplSetTest only &lt;a href=&quot;https://github.com/mongodb/mongo/blob/b205efb00fd6e9ce27646070e934983384e8c0e2/src/mongo/shell/replsettest.js#L2500-L2513&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;calls&lt;/a&gt; &lt;tt&gt;checkOplogs&lt;/tt&gt; and &lt;tt&gt;checkReplicatedDataHashes&lt;/tt&gt;. We may want to remove the extra calls to &lt;tt&gt;checkOplogs&lt;/tt&gt; and &lt;tt&gt;checkReplicatedDataHashes&lt;/tt&gt; while leaving the call to &lt;tt&gt;validateNodes&lt;/tt&gt; present in the RollbackTest consistency checks.&lt;/p&gt;</comment>
                            <comment id="2278724" author="william.schultz" created="Mon, 10 Jun 2019 23:12:18 +0000"  >&lt;p&gt;As one example of the slowdown incurred by these extra checks, running the &lt;tt&gt;rollback_rename_collection_on_sync_source.js&lt;/tt&gt; test with the redundant checks in place took 58.75 seconds on my local machine, and 46.83 seconds after removing the redundant check.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="309417">SERVER-25640</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>5.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_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>Tue, 14 Jan 2020 17:57:08 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 2 weeks, 2 days 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>
                            4 years, 2 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>ryan.timmons@mongodb.com</customfieldvalue>
            <customfieldvalue>william.schultz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hv42dr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hw3yi7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3440">Repl 2020-01-27</customfieldvalue>
    <customfieldvalue id="3575">Repl 2020-02-10</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|hv3on3:</customfieldvalue>

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