<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:36:02 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-77591] Properly shut down executors in these files owned by Sharding NYC</title>
                <link>https://jira.mongodb.org/browse/SERVER-77591</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In the following files, there exist executors that may not be properly shutdown by calling both &lt;tt&gt;join&lt;/tt&gt; and &lt;tt&gt;shutdown&lt;/tt&gt;.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;client/server_discovery_monitor.cpp
	&lt;ul&gt;
		&lt;li&gt;560,11: result-&amp;gt;startup();&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;db/s/global_index/global_index_cloning_service.cpp
	&lt;ul&gt;
		&lt;li&gt;113,28: &#160; &#160; _execForCancelableOpCtx-&amp;gt;startup();&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;db/s/move_primary/move_primary_donor_service.cpp
	&lt;ul&gt;
		&lt;li&gt;222,24: &#160; &#160; _markKilledExecutor-&amp;gt;startup();&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;db/s/move_primary/move_primary_recipient_service.cpp
	&lt;ul&gt;
		&lt;li&gt;219,24: &#160; &#160; _markKilledExecutor-&amp;gt;startup();&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;db/s/resharding/resharding_coordinator_service.cpp
	&lt;ul&gt;
		&lt;li&gt;1624,24: &#160; &#160; _markKilledExecutor-&amp;gt;startup();&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;db/s/resharding/resharding_donor_service.cpp
	&lt;ul&gt;
		&lt;li&gt;456,24: &#160; &#160; _markKilledExecutor-&amp;gt;startup();&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;db/s/resharding/resharding_recipient_service.cpp
	&lt;ul&gt;
		&lt;li&gt;474,24: &#160; &#160; _markKilledExecutor-&amp;gt;startup();&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;To reference the full list of files/executors combed, please refer to the linked BF ticket.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2353931">SERVER-77591</key>
            <summary>Properly shut down executors in these files owned by Sharding NYC</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="13202">Works as Designed</resolution>
                                        <assignee username="brett.nawrocki@mongodb.com">Brett Nawrocki</assignee>
                                    <reporter username="blake.oler@mongodb.com">Blake Oler</reporter>
                        <labels>
                    </labels>
                <created>Tue, 30 May 2023 17:50:41 +0000</created>
                <updated>Fri, 27 Oct 2023 13:51:36 +0000</updated>
                            <resolved>Thu, 1 Jun 2023 21:37:56 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5468985" author="JIRAUSER1262262" created="Thu, 1 Jun 2023 21:36:03 +0000"  >&lt;p&gt;The following executors are all ThreadPools held as shared_ptrs by PrimaryOnlyService instances. These should be shut down correctly for the reasons described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77597?focusedCommentId=5467880&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-5467880&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt;.&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db/s/global_index/global_index_cloning_service.cpp&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db/s/move_primary/move_primary_donor_service.cpp&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db/s/move_primary/move_primary_recipient_service.cpp&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db/s/resharding/resharding_coordinator_service.cpp&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db/s/resharding/resharding_donor_service.cpp&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db/s/resharding/resharding_recipient_service.cpp&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;The remaining client/server_discovery_monitor.cpp is a unique case, but should also be shut down correctly. The &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/executor/thread_pool_task_executor.h#L55&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ThreadPoolTaskExecutor&lt;/a&gt; created &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/server_discovery_monitor.cpp#L559&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; is used to &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/server_discovery_monitor.cpp#L463&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;initialize _executor&lt;/a&gt;, a &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/server_discovery_monitor.h#L167&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;shared_ptr member&lt;/a&gt;. ThreadPoolTaskExecutor should shut itself down properly in its &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/executor/thread_pool_task_executor.cpp#L144-L148&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;destructor&lt;/a&gt;, calling both shutdown and join. This executor will be used to initialize multiple child &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/server_discovery_monitor.h#L42&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;SingleServerDiscoveryMonitor&lt;/a&gt; instances, however these are stored as shared pointers only in a &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/server_discovery_monitor.h#LL168C18-L168C18&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;map&lt;/a&gt;, which will be destroyed when the ServerDiscoveryMonitor&apos;s destructor is called.&lt;/p&gt;

&lt;p&gt;The ServerDiscoveryMonitor itself is held by &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/streamable_replica_set_monitor.h#L297&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;StreamableReplicaSetMonitor&lt;/a&gt;, which in turn is created by &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/replica_set_monitor_manager.cpp#L199-L200&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ReplicaSetMonitorManager&lt;/a&gt;, which stores these instances in a &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/replica_set_monitor_manager.cpp#L202&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;map&lt;/a&gt;. The ReplicaSetMonitorManager is a &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/replica_set_monitor_manager.cpp#L71-L72&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;decoration&lt;/a&gt; on the global ServiceContext.&lt;/p&gt;

&lt;p&gt;ReplicaSetMonitorManager is eventually shut down via the &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/replica_set_monitor.cpp#L104-L106&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ReplicaSetMonitor::shutdown method&lt;/a&gt;, which is called as part of process shutdown in &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/db/mongod_main.cpp#L1558&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongod&lt;/a&gt; and &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/s/mongos_main.cpp#L505&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongos&lt;/a&gt;. When shut down, the map containing the child monitors (i.e. ultimately the ServerDiscoveryMonitors) is &lt;a href=&quot;https://github.com/10gen/mongo/blob/52db3d4bbd9bf06cda34859769acc53a690a45dd/src/mongo/client/replica_set_monitor_manager.cpp#LL292C9-L292C9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;cleared&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25134"><![CDATA[Sharding NYC]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25578"><![CDATA[v7.0]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 1 Jun 2023 21:36:03 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        35 weeks, 6 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_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>
                            35 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>113.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>blake.oler@mongodb.com</customfieldvalue>
            <customfieldvalue>brett.nawrocki@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2bfqf:</customfieldvalue>

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

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