<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:34:31 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-54803] StreamableReplicaSetMonitor registers a new topology listener per call to getHostsOrRefresh</title>
                <link>https://jira.mongodb.org/browse/SERVER-54803</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Whenever &lt;a href=&quot;https://github.com/mongodb/mongo/blob/913d6b62acfbb344dde1b116f4161360acd8fd13/src/mongo/client/streamable_replica_set_monitor.cpp#L256&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;StreamableReplicaSetMonitor::getHostsOrRefresh&lt;/a&gt; is called (which happens on every query), if the result isn&apos;t immediately available, we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/913d6b62acfbb344dde1b116f4161360acd8fd13/src/mongo/client/streamable_replica_set_monitor.cpp#L304&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;enqueue a query object&lt;/a&gt; for that host, to be resolved &lt;a href=&quot;https://github.com/mongodb/mongo/blob/913d6b62acfbb344dde1b116f4161360acd8fd13/src/mongo/client/streamable_replica_set_monitor.cpp#L744&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;when the host becomes available&lt;/a&gt;. As part of enqueuing a query, we unconditionally &lt;a href=&quot;https://github.com/mongodb/mongo/blob/913d6b62acfbb344dde1b116f4161360acd8fd13/src/mongo/client/streamable_replica_set_monitor.cpp#L358&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;register the query processor as an event listener&lt;/a&gt; for topology changes. We only &lt;a href=&quot;https://github.com/mongodb/mongo/blob/913d6b62acfbb344dde1b116f4161360acd8fd13/src/mongo/client/streamable_replica_set_monitor.cpp#L764-L766&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;remove that listener when all outstanding queries are satisfied&lt;/a&gt;, but that won&apos;t happen as long as the node the RSM is targeting is down or unable to be contacted. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/913d6b62acfbb344dde1b116f4161360acd8fd13/src/mongo/client/sdam/topology_listener.cpp#L35&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Registering a listener&lt;/a&gt; does not do any deduplication to check whether the passed-in pointer is the same, which means the list of listeners will continue to grow as long as there are new queries. It also means that every time there&apos;s a topology change event, ALL of those listeners will then call requestImmediateCheck.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;We should change it so that the RSM _queryProcessor topology listener is only registered at most once.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1634264">SERVER-54803</key>
            <summary>StreamableReplicaSetMonitor registers a new topology listener per call to getHostsOrRefresh</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="lamont.nelson@mongodb.com">Lamont Nelson</assignee>
                                    <reporter username="matthew.saltz@mongodb.com">Matthew Saltz</reporter>
                        <labels>
                            <label>bkp</label>
                            <label>sharding-wfbf-day</label>
                    </labels>
                <created>Thu, 25 Feb 2021 21:06:25 +0000</created>
                <updated>Sun, 29 Oct 2023 21:57:00 +0000</updated>
                            <resolved>Tue, 8 Jun 2021 16:38:41 +0000</resolved>
                                    <version>4.4.4</version>
                                    <fixVersion>4.4.5</fixVersion>
                    <fixVersion>5.0.0-rc1</fixVersion>
                    <fixVersion>5.1.0-rc0</fixVersion>
                                    <component>Networking</component>
                                        <votes>0</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="3866529" author="xgen-internal-githook" created="Tue, 8 Jun 2021 15:51:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matthew Saltz&apos;, &apos;email&apos;: &apos;matthew.saltz@mongodb.com&apos;, &apos;username&apos;: &apos;saltzm&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54803&quot; title=&quot;StreamableReplicaSetMonitor registers a new topology listener per call to getHostsOrRefresh&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54803&quot;&gt;&lt;del&gt;SERVER-54803&lt;/del&gt;&lt;/a&gt; Only register _queryProcessor once in StreamableRSM&lt;/p&gt;

&lt;p&gt;(cherry picked from commit d6394bb39aae0ae99cfeeb9569203de2ff98e11a)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2a98238a5a51521cd022a68ebfd79b5a39796b8d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2a98238a5a51521cd022a68ebfd79b5a39796b8d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3863479" author="xgen-internal-githook" created="Mon, 7 Jun 2021 20:12:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matthew Saltz&apos;, &apos;email&apos;: &apos;matthew.saltz@mongodb.com&apos;, &apos;username&apos;: &apos;saltzm&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54803&quot; title=&quot;StreamableReplicaSetMonitor registers a new topology listener per call to getHostsOrRefresh&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54803&quot;&gt;&lt;del&gt;SERVER-54803&lt;/del&gt;&lt;/a&gt; Only register _queryProcessor once in StreamableRSM&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d6394bb39aae0ae99cfeeb9569203de2ff98e11a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d6394bb39aae0ae99cfeeb9569203de2ff98e11a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3842092" author="lamont.nelson" created="Wed, 26 May 2021 16:26:26 +0000"  >&lt;p&gt;This shouldn&apos;t conflict with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56854&quot; title=&quot;Provide the ability for RSM requests to timeout and mark the server as failed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56854&quot;&gt;&lt;del&gt;SERVER-56854&lt;/del&gt;&lt;/a&gt; since that is for the 4.0 &amp;amp; 4.2 branches. It looks like this one just needs to be ported to 5.0 and master.&lt;/p&gt;</comment>
                            <comment id="3672289" author="matthew.saltz" created="Thu, 18 Mar 2021 21:13:11 +0000"  >&lt;p&gt;Re-opening and opening a 4.4 Backport ticket, which I&apos;ll then immediately close since the commit went straight to the 4.4 branch&lt;/p&gt;</comment>
                            <comment id="3672242" author="xgen-internal-githook" created="Thu, 18 Mar 2021 20:54:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matthew Saltz&apos;, &apos;email&apos;: &apos;matthew.saltz@mongodb.com&apos;, &apos;username&apos;: &apos;saltzm&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-54803&quot; title=&quot;StreamableReplicaSetMonitor registers a new topology listener per call to getHostsOrRefresh&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-54803&quot;&gt;&lt;del&gt;SERVER-54803&lt;/del&gt;&lt;/a&gt; Only register _queryProcessor once in StreamableRSM&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/80250fc73deb1d300473b8d2e9e98b5385da90c7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/80250fc73deb1d300473b8d2e9e98b5385da90c7&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </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>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="21777"><![CDATA[v5.0]]></customfieldvalue>
    <customfieldvalue key="18953"><![CDATA[v4.4]]></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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000sdBRgQAM, 5002K00000tUpqEQAS]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 18 Mar 2021 20:54:38 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 35 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>
                            2 years, 35 weeks, 1 day ago
                        </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>lamont.nelson@mongodb.com</customfieldvalue>
            <customfieldvalue>matthew.saltz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hywz3j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hyk2uv:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="4503">Service Arch 2021-03-22</customfieldvalue>

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

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