<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:07:07 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-24688] Graceful shutdown without destroying the current cmd</title>
                <link>https://jira.mongodb.org/browse/SERVER-24688</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This feature would provide the option to request a graceful shutdown of mongos. Its behavior is outlined below:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;the client sends a request to a mongos that forwards the query to mongodb&lt;/li&gt;
	&lt;li&gt;when mongos receives a specific signal (like SIGTERM), all heartbeats return an error to the client&lt;/li&gt;
	&lt;li&gt;the client removes that mongos from the available mongos pool and does not send any new requests to that mongos&lt;/li&gt;
	&lt;li&gt;mongos waits until all old queries are done without accepting new ones&lt;/li&gt;
	&lt;li&gt;mongos now is free to shut down itself&lt;br/&gt;
In the fourth item, mongos could wait endlessly, so a timer can force the shutdown aggressively to avoid stall state.&lt;/li&gt;
&lt;/ol&gt;


&lt;h6&gt;&lt;a name=&quot;OriginalDescription&quot;&gt;&lt;/a&gt;Original Description&lt;/h6&gt;
&lt;p&gt;Is it possible to shutdown mongos daemon gracefully? Which signal I should launch to the process?&lt;/p&gt;

&lt;p&gt;Thinking about a mongos that has received a query. While the mongodb calculates the query, the mongos can be stopped. If mongos is stopped, the client driver (like nodejs does) returns a socket error.&lt;br/&gt;
This mean that the client is not able to know if the query runs successfully or not.&lt;br/&gt;
In a write context is a problem. A socket error is undetermined state.&lt;/p&gt;</description>
                <environment></environment>
        <key id="295540">SERVER-24688</key>
            <summary>Graceful shutdown without destroying the current cmd</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="3">Duplicate</resolution>
                                        <assignee username="tess.avitabile@mongodb.com">Tess Avitabile</assignee>
                                    <reporter username="tomallevi@gmail.com">Tommaso Allevi</reporter>
                        <labels>
                            <label>move-sa</label>
                            <label>platforms-re-triaged</label>
                    </labels>
                <created>Tue, 21 Jun 2016 16:32:11 +0000</created>
                <updated>Wed, 8 Feb 2023 15:07:23 +0000</updated>
                            <resolved>Wed, 15 Jul 2020 18:39:36 +0000</resolved>
                                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>12</watches>
                                                                                                                <comments>
                            <comment id="3286747" author="tess.avitabile" created="Wed, 15 Jul 2020 18:39:21 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=allevo&quot; class=&quot;user-hover&quot; rel=&quot;allevo&quot;&gt;allevo&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for this feature request. In response to requests for a more graceful shutdown on mongod and mongos, we&apos;ve implemented the quiesce mode feature:&lt;/p&gt;

&lt;p&gt;mongod secondaries and mongos will enter a quiesce mode prior to shutdown, to allow short-running operations to finish. During this time, new and existing operations are allowed to run, but isMaster requests return a &lt;tt&gt;ShutdownInProgress&lt;/tt&gt;&#160;error, to indicate that clients should start routing operations to other nodes. On mongod, quiesce mode happens after the stepdown attempt, and only if the node is now in state SECONDARY. The combined time for stepdown and quiesce mode is specified by the &lt;tt&gt;timeoutSecs&lt;/tt&gt;&#160;parameter to the shutdown command (for command-based shutdown) or the &lt;tt&gt;shutdownTimeoutMillisForSignaledShutdown&lt;/tt&gt;/&lt;tt&gt;mongosShutdownTimeoutMillisForSignaledShutdown&lt;/tt&gt; server parameter (for signaled shutdown).&lt;/p&gt;

&lt;p&gt;This work is completed as of&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46952&quot; title=&quot;Create server parameter shutdownTimeoutMillisForSignaledShutdown on mongod&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46952&quot;&gt;&lt;del&gt;SERVER-46952&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46958&quot; title=&quot;Create server parameter shutdownTimeoutMillisForSignaledShutdown on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46958&quot;&gt;&lt;del&gt;SERVER-46958&lt;/del&gt;&lt;/a&gt;. I believe this satisfies your original ticket, so I&apos;m going to closed this as a duplicate of&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46958&quot; title=&quot;Create server parameter shutdownTimeoutMillisForSignaledShutdown on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46958&quot;&gt;&lt;del&gt;SERVER-46958&lt;/del&gt;&lt;/a&gt;. If not, please reopen this request and provide more details about your requirements.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;/p&gt;

&lt;p&gt;Tess&lt;/p&gt;</comment>
                            <comment id="1302719" author="thomas.schubert" created="Wed, 22 Jun 2016 14:48:28 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=allevo&quot; class=&quot;user-hover&quot; rel=&quot;allevo&quot;&gt;allevo&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for clarifying this feature request. I&apos;ve updated the ticket description to reflect your latest comment and have marked this ticket to be considered during the next round of planning. Please continue to watch for updates&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                            <comment id="1302576" author="tomallevi@gmail.com" created="Wed, 22 Jun 2016 13:35:04 +0000"  >&lt;p&gt;The problem is clear: according to the theory, in a production environment, when the high availability is required, the application has to trust in its database. No undefined behavior should be permitted.&lt;br/&gt;
Practically, this can never happen. So the chosen behavior should reduce as lower as possible the nondeterministic behavior.&lt;/p&gt;

&lt;p&gt;I&apos;m thinking when our DBA team is upgrading mongos cluster.&lt;/p&gt;

&lt;p&gt;I suppose the expected behavior during a graceful shutdown is like this:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;the client sends a request to a mongos that forward the query to mongodb&lt;/li&gt;
	&lt;li&gt;when mongos receives a specific signal (like SIGTERM), all heartbeats return an error to the client&lt;/li&gt;
	&lt;li&gt;the client remove that mongos from the available mongos pool and shouldn&apos;t send new request to that mongos&lt;/li&gt;
	&lt;li&gt;mongos wait until all old queries are done without accepting new ones&lt;/li&gt;
	&lt;li&gt;mongos now is free to shut down itself&lt;br/&gt;
In the fourth item, mongos cloud wait endlessly, so a timer can force the shutdown aggressively to avoid stall state.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="1301483" author="ramon.fernandez" created="Tue, 21 Jun 2016 17:00:58 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=allevo&quot; class=&quot;user-hover&quot; rel=&quot;allevo&quot;&gt;allevo&lt;/a&gt;, what&apos;s the behavior you think would make sense? If the &lt;tt&gt;mongos&lt;/tt&gt; is shut down the client can no longer receive any information from the server.&lt;/p&gt;

&lt;p&gt;We can turn this ticket into a feature request, but it needs a better definition of the expected behavior, so can you please provide additional details?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="1280641">SERVER-46958</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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 21 Jun 2016 17:00:58 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 30 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_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>
                            3 years, 30 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>tess.avitabile@mongodb.com</customfieldvalue>
            <customfieldvalue>tomallevi@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrk4tj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9gbr:</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="4034">Repl 2020-07-27</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|hseunb:</customfieldvalue>

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