<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:53:04 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-39770] FSM connection cache setup can fail with step down</title>
                <link>https://jira.mongodb.org/browse/SERVER-39770</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As part of setting up an fsm test, we sometimes try to create connections to all nodes &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/fsm.js#L33&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;, which will eventually call &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/src/mongo/shell/shell_utils.cpp#L374&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;whatsmyuri&lt;/a&gt;. However, if this is running on a continuous stepdown suite, you can hit a network error while trying to establish the connection. It is also unclear if we ever re-establish the connections if the connections were closed after the setup due to stepdown.&lt;/p&gt;</description>
                <environment></environment>
        <key id="703076">SERVER-39770</key>
            <summary>FSM connection cache setup can fail with step down</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="vesselina.ratcheva@mongodb.com">Vesselina Ratcheva</assignee>
                                    <reporter username="randolph@mongodb.com">Randolph Tan</reporter>
                        <labels>
                            <label>prepare_testing</label>
                            <label>tig-concurrency</label>
                    </labels>
                <created>Fri, 22 Feb 2019 19:48:18 +0000</created>
                <updated>Sun, 29 Oct 2023 22:23:40 +0000</updated>
                            <resolved>Fri, 24 May 2019 17:49:29 +0000</resolved>
                                                    <fixVersion>4.1.12</fixVersion>
                                    <component>Testing Infrastructure</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="2259538" author="xgen-internal-githook" created="Fri, 24 May 2019 17:47:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;vesselina.ratcheva@10gen.com&apos;, &apos;name&apos;: &apos;Vesselina Ratcheva&apos;, &apos;username&apos;: &apos;vessy-mongodb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39770&quot; title=&quot;FSM connection cache setup can fail with step down&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39770&quot;&gt;&lt;del&gt;SERVER-39770&lt;/del&gt;&lt;/a&gt; Add retry logic to FSM connection cache setup&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/efe7bc8007aa932a1533af95d980909cd4a39670&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/efe7bc8007aa932a1533af95d980909cd4a39670&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2256684" author="max.hirschhorn@10gen.com" created="Wed, 22 May 2019 18:36:56 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Would it be possible to re-prioritize this ticket? I expect we would see a nontrivial amount of failures if I were to push &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39993&quot; title=&quot;Add kill and terminate versions of concurrency step down suites&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39993&quot;&gt;&lt;del&gt;SERVER-39993&lt;/del&gt;&lt;/a&gt; without this fix.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I think adding retries around &lt;tt&gt;new Mongo(...)&lt;/tt&gt; and &lt;tt&gt;new SpecificSecondaryReaderMongo(...)&lt;/tt&gt; with option (a) is going to be the easier route. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41096&quot; title=&quot;ContinuousStepdown thread and resmoke runner do not synchronize properly on the &amp;quot;stepdown permitted file&amp;quot; and &amp;quot;stepping down file&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41096&quot;&gt;&lt;del&gt;SERVER-41096&lt;/del&gt;&lt;/a&gt; describes a bug with the management of the stepdown file used to synchronize the background thread in resmoke.py and the concurrency framework in the mongo shell that I worry attempting to do option (b) might mean we need to fix both issues simultaneously.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vesselina.ratcheva&quot; class=&quot;user-hover&quot; rel=&quot;vesselina.ratcheva&quot;&gt;vesselina.ratcheva&lt;/a&gt;, do you want to chat through how to go about doing this? &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e9753b56fe3f7e5c3e783f31d3ed5fe7afb8f641/jstests/libs/override_methods/network_error_and_txn_override.js#L1058-L1085&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;The &lt;tt&gt;network_error_and_txn_override.js&lt;/tt&gt; override file&lt;/a&gt; is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e9753b56fe3f7e5c3e783f31d3ed5fe7afb8f641/jstests/concurrency/fsm_libs/worker_thread.js#L140-L155&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;already &lt;tt&gt;load()&lt;/tt&gt;&apos;d by the FSM worker thread (though it happens after the &lt;tt&gt;new Mongo(...)&lt;/tt&gt; and &lt;tt&gt;new SpecificSecondaryReaderMongo(...)&lt;/tt&gt; calls right now)&lt;/a&gt; so we could use &lt;tt&gt;connect()&lt;/tt&gt; to do the retries instead of writing a separate &lt;tt&gt;assert.soon()&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Note that overriding the global &lt;tt&gt;Mongo&lt;/tt&gt; object isn&apos;t viable because of how the &lt;tt&gt;DBClientConnection&lt;/tt&gt; is stored in its private data field and can only be accessed through the C++-backed JavaScript object.&lt;/p&gt;</comment>
                            <comment id="2256638" author="vesselina.ratcheva" created="Wed, 22 May 2019 18:09:19 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt; I&apos;ve been seeing this pretty frequently in the new suites for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39993&quot; title=&quot;Add kill and terminate versions of concurrency step down suites&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39993&quot;&gt;&lt;del&gt;SERVER-39993&lt;/del&gt;&lt;/a&gt;. Would it be possible to re-prioritize this ticket? I expect we would see a nontrivial amount of failures if I were to push &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39993&quot; title=&quot;Add kill and terminate versions of concurrency step down suites&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39993&quot;&gt;&lt;del&gt;SERVER-39993&lt;/del&gt;&lt;/a&gt; without this fix.&lt;/p&gt;</comment>
                            <comment id="2162440" author="max.hirschhorn@10gen.com" created="Mon, 25 Feb 2019 23:41:51 +0000"  >&lt;blockquote&gt;
&lt;p&gt;It is also unclear if we ever re-establish the connections if the connections were closed after the setup due to stepdown.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Just to clarify - &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/resmoke_runner.js#L191&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the connections owned by the main thread are reconnected by calling &lt;tt&gt;Cluster#reestablishConnectionsAfterFailover()&lt;/tt&gt;&lt;/a&gt; which just &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/cluster.js#L205-L212&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;calls &lt;tt&gt;ReplSetTest#getPrimary()&lt;/tt&gt; on the CSRS and replica set shards in the case of a sharded cluster&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As part of setting up an fsm test, we sometimes try to create connections to all nodes &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/fsm.js#L33&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;, which will eventually call &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/src/mongo/shell/shell_utils.cpp#L374&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;whatsmyuri&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;We could consider (a) retrying connection establishment &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/fsm.js#L33&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;when &lt;tt&gt;args.passConnectionCache=true&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/worker_thread.js#L49&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;when &lt;tt&gt;TestData.pinningSecondary=true&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/worker_thread.js#L51&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;when establishing connections for all other cases&lt;/a&gt;, or (b) populating the connection cache non-lazily and starting the stepdown thread slightly later. We should actually only &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/resmoke_runner.js#L122-L132&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;start the stepdown thread&lt;/a&gt; after &lt;tt&gt;latch.getCount() === 0&lt;/tt&gt;, which &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/worker_thread.js#L212&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;corresponds to whether the worker threads have finished their initialization&lt;/a&gt; or &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/thread_mgr.js#L143&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;has failed to initialized&lt;/a&gt;. That is to say, to implement (b) we should start the stepdown thread &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ab7df179a7329fea4c28049d1ff532010720280/jstests/concurrency/fsm_libs/resmoke_runner.js#L163&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;after calling &lt;tt&gt;threadMgr.checkFailed(0.2)&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="711084">SERVER-39993</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="764606">SERVER-41096</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>4.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>Mon, 25 Feb 2019 23:41:51 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 37 weeks, 5 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1032</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, 37 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>18.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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
            <customfieldvalue>vesselina.ratcheva@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huogpz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hue7qn:</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="2999">Repl 2019-06-03</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|huo2zb:</customfieldvalue>

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