<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:43:52 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-58200] Asserting clauses do not cause a jstest to fail when it is run through startParallelShell() </title>
                <link>https://jira.mongodb.org/browse/SERVER-58200</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Updated Description:&lt;br/&gt;
&lt;tt&gt;startParallelShell&lt;/tt&gt; returns a function that needs to be called to assert the output of the shell. This is not intuitive and error prone. We should be able to enforce that the returned function is called by storing and removing pids in a dict and checking that the dict is empty on shell shutdown.&lt;/p&gt;

&lt;p&gt;See impl sketch here: &lt;a href=&quot;https://github.com/mongodb/mongo/commit/bd70fe9b24fbefbb2d7a483d15a5a7d3a326b315&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bd70fe9b24fbefbb2d7a483d15a5a7d3a326b315&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Original Description:&lt;br/&gt;
When executing an asserting function through startParallelShell() , the failure will appear in tests.log as an uncaught exception, but the test will still pass.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1806095">SERVER-58200</key>
            <summary>Asserting clauses do not cause a jstest to fail when it is run through startParallelShell() </summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="richard.samuels@mongodb.com">Richard Samuels</assignee>
                                    <reporter username="paolo.polato@mongodb.com">Paolo Polato</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Jul 2021 16:15:00 +0000</created>
                <updated>Sun, 29 Oct 2023 21:51:25 +0000</updated>
                            <resolved>Tue, 31 Aug 2021 13:21:34 +0000</resolved>
                                                    <fixVersion>5.1.0-rc0</fixVersion>
                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4107573" author="JIRAUSER1259052" created="Wed, 6 Oct 2021 18:30:16 +0000"  >&lt;p&gt;Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it&#8217;s been triggered. For more active release information, please keep an eye on #server-release. Thank you!&lt;/p&gt;</comment>
                            <comment id="4031192" author="xgen-internal-githook" created="Tue, 31 Aug 2021 13:20:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Richard Samuels&apos;, &apos;email&apos;: &apos;richard.l.samuels@gmail.com&apos;, &apos;username&apos;: &apos;richardsamuels&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58200&quot; title=&quot;Asserting clauses do not cause a jstest to fail when it is run through startParallelShell() &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58200&quot;&gt;&lt;del&gt;SERVER-58200&lt;/del&gt;&lt;/a&gt; Require calling parallel shell callback for every spawned parallel shell&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/61efca02fadc86178a0effd8ad6d60a77b265dca&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/61efca02fadc86178a0effd8ad6d60a77b265dca&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3920193" author="robert.guo" created="Wed, 7 Jul 2021 12:40:42 +0000"  >&lt;p&gt;Got it! Thanks for the clarification Max and Paolo.&lt;/p&gt;</comment>
                            <comment id="3920071" author="max.hirschhorn@10gen.com" created="Wed, 7 Jul 2021 11:36:17 +0000"  >&lt;p&gt;Just to clarify - yes, there is a problem in the txn&amp;#95;two&amp;#95;phase&amp;#95;commit&amp;#95;coordinator&amp;#95;shutdown&amp;#95;and&amp;#95;restart.js test in that &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e73b00adcc78816b7c4f1293b3d76b42b3690dd9/jstests/sharding/txn_two_phase_commit_coordinator_shutdown_and_restart.js#L111&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;it ignores the return value of the &lt;tt&gt;startParallelShell()&lt;/tt&gt; function&lt;/a&gt;. This issue in the txn&amp;#95;two&amp;#95;phase&amp;#95;commit&amp;#95;coordinator&amp;#95;shutdown&amp;#95;and&amp;#95;restart.js test should be fixed separately from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58200&quot; title=&quot;Asserting clauses do not cause a jstest to fail when it is run through startParallelShell() &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58200&quot;&gt;&lt;del&gt;SERVER-58200&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I&apos;d like &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58200&quot; title=&quot;Asserting clauses do not cause a jstest to fail when it is run through startParallelShell() &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58200&quot;&gt;&lt;del&gt;SERVER-58200&lt;/del&gt;&lt;/a&gt; to be making it so ignoring the return value of the startParallelShell() function is considered a programmer error that causes the test to fail. We already do something like this for MongoRunner.stopMongod(), ReplSetTest#stopSet(), and ShardingTest#stop() through TestData.failIfUnterminatedProcesses to guarantee that we run the validation and data consistency checks in every test. TestData.failIfUnterminatedProcesses doesn&apos;t work as-is for startParallelShell() because the mongo shell will have already exited by the time the main shell process exits.&lt;/p&gt;</comment>
                            <comment id="3919733" author="JIRAUSER1259531" created="Wed, 7 Jul 2021 07:49:51 +0000"  >&lt;p&gt;Hi Robert,&lt;/p&gt;

&lt;p&gt;And thanks for the explanation.&lt;/p&gt;

&lt;p&gt;I was not familiar with the contract defined by &lt;tt&gt;startParallelShell()&lt;/tt&gt; - and based on the implementation of &lt;tt&gt;jstests/sharding/txn_two_phase_commit_coordinator_shutdown_and_restart.js&lt;/tt&gt;, I had just assumed that by it would raise an exception when executing some asserting code by default.&lt;/p&gt;

&lt;p&gt;If my understanding is correct, the issue lies actually in the jstest - and the outcome of the function run through &lt;tt&gt;startParallelShell()&lt;/tt&gt; should be verified in a way similar to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7422c1b638d2e4b200e7b72041d76f5702364d2b/jstests/sharding/test_resharding_test_fixture_using_with_syntax.js#L48-L49&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this other example&lt;/a&gt;... Am i right?&lt;/p&gt;</comment>
                            <comment id="3918109" author="robert.guo" created="Tue, 6 Jul 2021 15:03:04 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=paolo.polato&quot; class=&quot;user-hover&quot; rel=&quot;paolo.polato&quot;&gt;paolo.polato&lt;/a&gt;, would you mind clarifying your expected outcome here? As you had mentioned above, you need to set &lt;tt&gt;checkExitSuccess&lt;/tt&gt; on the return object of &lt;tt&gt;startParallelShell&lt;/tt&gt; to assert the exit code of the child shell process. This would be a change in &lt;tt&gt;runCommitThroughMongosInParallelShellExpectTimeOut()&lt;/tt&gt;, not in the shell code.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                            <outwardlinks description="has to be done before">
                                        <issuelink>
            <issuekey id="1864083">SERVER-59686</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1864078">SERVER-59685</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1864084">SERVER-59687</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1864085">SERVER-59688</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1810763">SERVER-58325</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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_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, 6 Jul 2021 15:03:04 +0000</customfieldvalue>

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


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

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2405</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>
                            2 years, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>142.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>paolo.polato@mongodb.com</customfieldvalue>
            <customfieldvalue>richard.samuels@mongodb.com</customfieldvalue>
            <customfieldvalue>robert.guo@mongodb.com</customfieldvalue>
            <customfieldvalue>vivian.ge@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzq3fz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzg8vr:</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="5192">STM 2021-09-06</customfieldvalue>

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

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