<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:22:57 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-50549] Transform connection-related error codes in proxied commands</title>
                <link>https://jira.mongodb.org/browse/SERVER-50549</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Implementing a idea from the comments of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50459&quot; title=&quot;Include &amp;quot;source&amp;quot; field in error responses from mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50459&quot;&gt;SERVER-50459&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Some mongos-proxied or intracluster operations will have their error codes returned verbatim to the originating client. In some cases the error codes are related to connection health, and will be inappropriate for forwarding. The example we&apos;re using is InterruptedAtShutdown, but there are other members of this class of errors. This is because the client&apos;s driver is required to break connection when these codes are received, but really the error code refers to a proxy-to-internal connection, not the originating-client-to-proxy connection.&lt;/p&gt;

&lt;p&gt;Obviously error codes that report on the status of a connection must be interpreted in the proper context. Client drivers currently assume that these errors refer to the client-proxy connection.&lt;/p&gt;

&lt;p&gt;We&apos;ve decided to go with a simple improvement. Proxy connections will translate connection-related errors into a new different error which, as a new code, has no behavioral effect on drivers receiving it.&lt;/p&gt;

&lt;p&gt;It&apos;s still undecided whether there will be one new error code or many.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1453277">SERVER-50549</key>
            <summary>Transform connection-related error codes in proxied commands</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="billy.donahue@mongodb.com">Billy Donahue</assignee>
                                    <reporter username="billy.donahue@mongodb.com">Billy Donahue</reporter>
                        <labels>
                            <label>apm-issue</label>
                            <label>post-rc0</label>
                    </labels>
                <created>Wed, 26 Aug 2020 19:06:34 +0000</created>
                <updated>Mon, 8 Jan 2024 15:23:14 +0000</updated>
                            <resolved>Fri, 28 May 2021 17:00:51 +0000</resolved>
                                                    <fixVersion>4.4.7</fixVersion>
                    <fixVersion>5.0.0-rc1</fixVersion>
                    <fixVersion>4.2.17</fixVersion>
                    <fixVersion>5.1.0-rc0</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>18</watches>
                                                                                                                <comments>
                            <comment id="4046547" author="xgen-internal-githook" created="Thu, 9 Sep 2021 06:34:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50549&quot; title=&quot;Transform connection-related error codes in proxied commands&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50549&quot;&gt;&lt;del&gt;SERVER-50549&lt;/del&gt;&lt;/a&gt; transform state-changing errors returned by mongos&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 4a311668ac834b6e363a44c9f00cad9d4790288f)&lt;br/&gt;
(cherry picked from commit 3547ce01d32a4200d00205672fdf9d4eb44b7953)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/18914660730f29d262906ee3cf5dc1d90426badf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/18914660730f29d262906ee3cf5dc1d90426badf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3873528" author="xgen-internal-githook" created="Fri, 11 Jun 2021 16:20:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50549&quot; title=&quot;Transform connection-related error codes in proxied commands&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50549&quot;&gt;&lt;del&gt;SERVER-50549&lt;/del&gt;&lt;/a&gt; transform state-changing errors returned by mongos&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 4a311668ac834b6e363a44c9f00cad9d4790288f)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3547ce01d32a4200d00205672fdf9d4eb44b7953&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3547ce01d32a4200d00205672fdf9d4eb44b7953&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3867527" author="xgen-internal-githook" created="Tue, 8 Jun 2021 21:39:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50549&quot; title=&quot;Transform connection-related error codes in proxied commands&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50549&quot;&gt;&lt;del&gt;SERVER-50549&lt;/del&gt;&lt;/a&gt; transform state-changing errors returned by mongos&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 4a311668ac834b6e363a44c9f00cad9d4790288f)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/357923ed77b477539e65d0b8a4ec5cae0e11746a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/357923ed77b477539e65d0b8a4ec5cae0e11746a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3848099" author="xgen-internal-githook" created="Fri, 28 May 2021 16:58:33 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50549&quot; title=&quot;Transform connection-related error codes in proxied commands&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50549&quot;&gt;&lt;del&gt;SERVER-50549&lt;/del&gt;&lt;/a&gt; transform state-changing errors returned by mongos&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4a311668ac834b6e363a44c9f00cad9d4790288f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4a311668ac834b6e363a44c9f00cad9d4790288f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3767016" author="xgen-internal-githook" created="Tue, 11 May 2021 16:38:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Sviatlana Zuiko&apos;, &apos;email&apos;: &apos;sviatlana.zuiko@mongodb.com&apos;, &apos;username&apos;: &apos;szuiko&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50549&quot; title=&quot;Transform connection-related error codes in proxied commands&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50549&quot;&gt;&lt;del&gt;SERVER-50549&lt;/del&gt;&lt;/a&gt; transform state-changing errors returned by mongos&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit 1e10e32780ca47969342f6b52bfe09bc4134831e.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/01018b26d53b9561250374c2864e54016d54e034&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/01018b26d53b9561250374c2864e54016d54e034&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3763002" author="xgen-internal-githook" created="Mon, 10 May 2021 07:44:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50549&quot; title=&quot;Transform connection-related error codes in proxied commands&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50549&quot;&gt;&lt;del&gt;SERVER-50549&lt;/del&gt;&lt;/a&gt; transform state-changing errors returned by mongos&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1e10e32780ca47969342f6b52bfe09bc4134831e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1e10e32780ca47969342f6b52bfe09bc4134831e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3757530" author="billy.donahue" created="Wed, 5 May 2021 20:40:16 +0000"  >&lt;p&gt;This is ready to go!&lt;br/&gt;
Here&apos;s a green Evergreen patch build: &lt;a href=&quot;https://spruce.mongodb.com/version/6091ffe31e2d17141fa6235b/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://spruce.mongodb.com/version/6091ffe31e2d17141fa6235b/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3706254" author="billy.donahue" created="Wed, 7 Apr 2021 18:49:04 +0000"  >&lt;p&gt;Just an update here as it&apos;s been a while and I&apos;m switched back to it.&lt;/p&gt;

&lt;p&gt;The pseudocode from Divjot&apos;s most recent comment has been implemented.&lt;/p&gt;

&lt;p&gt;I&apos;m testing this code, and it looks like it&apos;s working as it&apos;s intended to work.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/compare/master...BillyDonahue:SERVER-50549&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/compare/master...BillyDonahue:SERVER-50549&lt;/a&gt;&lt;br/&gt;
(code review at &lt;a href=&quot;https://mongodbcr.appspot.com/712610012/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/712610012/&lt;/a&gt; )&lt;/p&gt;

&lt;p&gt;Several tests are red because they&apos;re not expecting mongos to rewrite anything.&lt;/p&gt;

&lt;p&gt;Hopefully these tests can be quickly adapted as part of the finishing touches phase after we check that this behavioral change solves the problem.&lt;/p&gt;

&lt;p&gt;Yes &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=isabel.atkinson&quot; class=&quot;user-hover&quot; rel=&quot;isabel.atkinson&quot;&gt;isabel.atkinson&lt;/a&gt; I believe the intent is to backport this change to 4.0.&lt;/p&gt;</comment>
                            <comment id="3620281" author="isabel.atkinson" created="Wed, 17 Feb 2021 21:16:23 +0000"  >&lt;p&gt;When this fix is implemented, would it be possible to backport it to 4.0? Per discussion with other drivers team members, we have decided not to implement the spec changes detailed DRIVERS-1376 as this ticket should fix the underlying issues, so it would be beneficial to have this change available to users on older server versions who are experiencing issues with errors from proxies.&lt;/p&gt;</comment>
                            <comment id="3492863" author="billy.donahue" created="Mon, 16 Nov 2020 23:03:23 +0000"  >&lt;p&gt;Divjot thanks for doing that testing. I could have saved you some time by describing in this ticket the exact algorithm we&apos;re implementing, as it was spoon fed to me. In the interest of expediency, I didn&apos;t front-load this project by reading the SDAM spec, so I&apos;m at a disadvantage.&lt;/p&gt;

&lt;p&gt;I feel like it would be a good time to regroup and capture requirements for the next round. Let&apos;s see if we can work out an exact description of what we need.&lt;/p&gt;

&lt;p&gt;For reference, this is the first draft of the algorithm that you tested:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://mongodbcr.appspot.com/712610012/diff/723820026/src/mongo/db/rewrite_nonlocal_shutdown_errors.cpp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/712610012/diff/723820026/src/mongo/db/rewrite_nonlocal_shutdown_errors.cpp&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; 105 /**&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; 106  * After we&apos;ve gotten a response from the service entry point,&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; 107  * check the response for `ok:0` and for `code:` fields that would imply that&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; 108  * the server is shutting down. If you find one of these, and&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; 109  * `!ServiceContext::getKillAllOperations()`, rewrite the `code:` to&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; 110  * `HostUnreachable` and scrub the `errmsg` of &quot;not master&quot; or &quot;node is&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; 111  * recovering&quot; substrings. See SERVER-50549.&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; 112  */&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;We revised this thanks to Shane and Pavi&apos;s excellent observations about Quiesce mode, such that the &lt;tt&gt;getKillAllOperations()&lt;/tt&gt; changes to &lt;tt&gt;getKillAllOperations(sc) || quiesceModeActive(sc)&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Now we need to change a little further. &quot;would imply that the server is shutting down&quot; is not good enough. We need to also rewrite any retryable errors.  I&apos;m not sure how this is going to work. Obviously shutdown errors should be rewritten if we&apos;re not locally shutting down. That made sense. But other retriables would need a corresponding check to determine if they&apos;re locally applicable. I&apos;d like to nail that down.&lt;/p&gt;</comment>
                            <comment id="3492851" author="divjot.arora" created="Mon, 16 Nov 2020 22:55:37 +0000"  >&lt;p&gt;At the very least, I think this has to cover all state change errors (i.e. errors which force drivers to mark servers Unknown and/or clear connection pools). Otherwise, it won&apos;t address the 4.4 regression. We could consider covering all retryable errors if mongos performs its own retries, but I don&apos;t think that was the main motivation for requesting this change.&lt;/p&gt;</comment>
                            <comment id="3492824" author="ben.caimano" created="Mon, 16 Nov 2020 22:38:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pavithra.vetriselvan&quot; class=&quot;user-hover&quot; rel=&quot;pavithra.vetriselvan&quot;&gt;pavithra.vetriselvan&lt;/a&gt;, I&apos;m hoping to see this cover all retriables honestly. Still, we have no scope for this work, so we&apos;re working on what is possible and what can reach consensus informally. Unfortunately, we can&apos;t rule out that mongod &amp;lt;-&amp;gt; mongod connections can forward errors because of some query magic.&lt;/p&gt;</comment>
                            <comment id="3492816" author="pavithra.vetriselvan" created="Mon, 16 Nov 2020 22:34:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=divjot.arora&quot; class=&quot;user-hover&quot; rel=&quot;divjot.arora&quot;&gt;divjot.arora&lt;/a&gt; I agree that the current solution in CR does not completely solve the original problem filed in this ticket since we&apos;re not rewriting recovering error codes or not master error codes. My suggestion was just for shutdown errors. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ben.caimano&quot; class=&quot;user-hover&quot; rel=&quot;ben.caimano&quot;&gt;ben.caimano&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=billy.donahue&quot; class=&quot;user-hover&quot; rel=&quot;billy.donahue&quot;&gt;billy.donahue&lt;/a&gt;, is it possible that this patch evolves into rewriting all retryable errors codes in responses from mongos?&lt;/p&gt;

&lt;p&gt;Alternatively, if we don&apos;t extend this patch to cover more error codes, I assume that work will be covered in PM-2100. I wonder if it makes more sense to scope out the work formally in that project since there seems to be many moving parts. Interested to hear thoughts! &lt;/p&gt;

&lt;p&gt;Divjot, as for your last statement, I think this issue is unique to a mongos &amp;lt;--&amp;gt; mongod connection and don&apos;t think it&apos;s possible for mongod to return errors from other mongod&apos;s.&lt;/p&gt;</comment>
                            <comment id="3490184" author="billy.donahue" created="Fri, 13 Nov 2020 21:24:19 +0000"  >
&lt;p&gt;Offline discussion with Pavi, thanks.  Answered some questions I had above.&lt;/p&gt;

&lt;p&gt;Quiesce mode is exclusively a precursor to shutdown. It should be treated the same as we&apos;d treat shutdown, for the purposes of this change.&lt;/p&gt;

&lt;p&gt;Some clarification yielded a tweak to the existing CR. The quiescing server doesn&apos;t mind if the client starts to think of it as being in shutdown. An outgoing message indicating a shutdown should be left alone if we&apos;re in either quiesce mode OR shutdown mode.&lt;/p&gt;

&lt;p&gt;&quot;Is there a simple predicate to detect whether we&apos;re in quiesce mode&quot; ?&lt;/p&gt;

&lt;p&gt;Not so simple, because it&apos;s kept in a different coordinator in mongos than on mongod. However, a ServiceContext decoration could handle this in an abstract way. These coordinators can both populate the abstract decorator slot when they come online. It&apos;s some extra work, but it will be reusable effort. I think we&apos;ll need this if we move the message rewriting code into a smarter and more efficient place instead of the Message reparsing we&apos;re awkwardly doing in service_state_machine in my CR.&lt;/p&gt;

&lt;p&gt;(notes for myself from Pavi stored here for my own reference&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;mongos quiesce mode is kept here:&lt;br/&gt;
  &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/s/mongos_topology_coordinator.h&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/s/mongos_topology_coordinator.h&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Same concept on mongod:&lt;br/&gt;
  &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/repl/replication_coordinator_impl.h#L1667-L1668&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/db/repl/replication_coordinator_impl.h#L1667-L1668&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3490174" author="pavithra.vetriselvan" created="Fri, 13 Nov 2020 21:17:19 +0000"  >&lt;p&gt;Yes, quiesce mode will always precede a shutdown. Quiesce mode is maintained by the &lt;tt&gt;MongosTopologyCoordinator&lt;/tt&gt; on monogos and the &lt;tt&gt;ReplicationCoordinatorImpl&lt;/tt&gt; on mongod. Both are accessible via the ServiceContext, which is actually how they both enter quiesce mode &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8a6082c74e1f6336784ad46cc609adc540d51712/src/mongo/s/mongos_main.cpp#L292-L297&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; (mongos) and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8a6082c74e1f6336784ad46cc609adc540d51712/src/mongo/db/mongod_main.cpp#L1103-L1106&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; (mongod). &lt;/p&gt;

&lt;p&gt;I agree with your predicate that &quot;if we&apos;re shutting down OR in quiesce mode,&quot; don&apos;t rewrite anything on its way out. If we have access to the ServiceContext, we should be able to tell whether or not we&apos;re in quiesce mode. &lt;/p&gt;</comment>
                            <comment id="3490099" author="pavithra.vetriselvan" created="Fri, 13 Nov 2020 20:44:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=billy.donahue&quot; class=&quot;user-hover&quot; rel=&quot;billy.donahue&quot;&gt;billy.donahue&lt;/a&gt; Ah, thank you for clarifying! Yes, I think it&apos;s a requirement that we should &lt;b&gt;not&lt;/b&gt; be rewriting ShutdownInProgress error codes from a quiescing mongos. Otherwise the drivers wouldn&apos;t know to clear the connection pool for a mongos that&apos;s shutting down. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=shane.harvey&quot; class=&quot;user-hover&quot; rel=&quot;shane.harvey&quot;&gt;shane.harvey&lt;/a&gt;, can you confirm that my assumption is correct?&lt;/p&gt;

&lt;p&gt;Another thing to note is that after mongos enters quiesce mode, it will increment its topologyVersion. We will attach the new topologyVersion to ShutdownErrors (both ShutdownInProgress &lt;b&gt;and&lt;/b&gt; InterruptedAtShutdown) throughout the rest of the shutdown process. This ensures that if a driver has received a hello response with ok:0 and error code ShutdownInProgress, then it can ignore future ShutdownErrors that have the same topologyVersion.&lt;/p&gt;

&lt;p&gt;So I think the key here is that we should be distinguishing whether shutdown errors between locally-generated ShutdownErrors and proxied ones. Do y&apos;all agree?&lt;/p&gt;</comment>
                            <comment id="3490070" author="billy.donahue" created="Fri, 13 Nov 2020 20:22:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pavithra.vetriselvan&quot; class=&quot;user-hover&quot; rel=&quot;pavithra.vetriselvan&quot;&gt;pavithra.vetriselvan&lt;/a&gt;, in my change, there is no distinction between locally-generated ShutdownError code and proxied ones.&lt;br/&gt;
All I&apos;m doing is looking at ANY outgoing message and rewriting them without regard to their origin.&lt;/p&gt;

&lt;p&gt;I believe you are saying a Quiesce-mode mongos will start locally emitting ShutdownInProgress, a ShutdownError code, even though the global ServiceContext is not in the &lt;tt&gt;KillAllOperations&lt;/tt&gt; state.&lt;/p&gt;

&lt;p&gt;&amp;gt;&amp;gt; However, this error comes from the mongos itself and not a proxied connection, so it should not be overwritten.&lt;/p&gt;

&lt;p&gt;When you say &quot;should not&quot;, I can&apos;t tell whether you&apos;re stating a requirement or a belief. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;My code as written doesn&apos;t care whether the message is from a proxy connection or not, so it sounds like it&apos;s not going to do what&apos;s needed.&lt;/p&gt;

&lt;p&gt;Would it be a problem if a quiescing mongos emitted HostUnreachable instead of InterruptedAtShutdown?&lt;/p&gt;

&lt;p&gt;Is Quiesce mode temporary or is it always meant to precede a shutdown?&lt;/p&gt;

&lt;p&gt;Is there a simple predicate to detect whether we&apos;re in quiesce mode, so we can maybe just have a rule that if we&apos;re shutting down OR in quiesce mode, we don&apos;t rewrite anything that&apos;s on its way out? It sounds like a mongos that&apos;s in quiesce mode doesn&apos;t mind the client thinking it&apos;s shutting down.&lt;/p&gt;</comment>
                            <comment id="3488615" author="pavithra.vetriselvan" created="Thu, 12 Nov 2020 23:47:11 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=shane.harvey&quot; class=&quot;user-hover&quot; rel=&quot;shane.harvey&quot;&gt;shane.harvey&lt;/a&gt;, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d78a7020f80d9a10b3fc5ba289841b3a97538582/src/mongo/s/mongos_main.cpp#L287-L297&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Quiesce Mode&lt;/a&gt; is enabled before we call &lt;tt&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/d78a7020f80d9a10b3fc5ba289841b3a97538582/src/mongo/s/mongos_main.cpp#L325-L327&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;setKillAllOperations&lt;/a&gt;&lt;/tt&gt;, which kills remaining running operations during shutdown. Operations at this point in the shutdown process will fail with &lt;tt&gt;InterruptedAtShutdown&lt;/tt&gt; errors. &lt;/p&gt;

&lt;p&gt;When we &quot;enter&quot; quiesce mode, we basically just sleep for the quiesceTime and don&apos;t continue with the shutdown process. In this patch, I think a mongos in quiesce mode would rewrite remote shard errors in the same way as a non-quiescing mongos since quiesce mode does not affect new or in-progress operations (on an existing connection). &lt;/p&gt;

&lt;p&gt;The major change in behavior is that a quiescing mongos will respond to any incoming hello requests with &quot;ShutdownInProgress&quot;. However, this error comes from the mongos itself and not a proxied connection, so it should not be overwritten.&lt;/p&gt;

&lt;p&gt;I think it would be interesting and simple enough to write a jstest that confirmed that we don&apos;t overwrite &quot;ShutdownInProgress&quot; errors from a quiescing mongos but that we do overwrite other &quot;not master&quot; errors originating from the shard itself. &lt;/p&gt;</comment>
                            <comment id="3488234" author="shane.harvey" created="Thu, 12 Nov 2020 19:52:37 +0000"  >&lt;p&gt;We should also ensure that a mongos in Quiesce mode (PM-1703) also rewrites remote shard errors in the same way as a non-Quiesce mode mongos. Looking at the CR the error rewriting behavior is gated on getKillAllOperations():&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: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;if&lt;/span&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; (sc-&amp;gt;getKillAllOperations())&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;    &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;return&lt;/span&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; message; &lt;/span&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// Skip: this service is shutting down.&lt;/span&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;&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;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pavithra.vetriselvan&quot; class=&quot;user-hover&quot; rel=&quot;pavithra.vetriselvan&quot;&gt;pavithra.vetriselvan&lt;/a&gt; does Quiesce mode change getKillAllOperations()? Do you think the change should test Quiesce mode explicitly? &lt;/p&gt;</comment>
                            <comment id="3480931" author="billy.donahue" created="Sun, 8 Nov 2020 19:05:14 +0000"  >&lt;p&gt;Code Review &lt;a href=&quot;https://mongodbcr.appspot.com/712610012/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/712610012/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3419997" author="billy.donahue" created="Thu, 1 Oct 2020 01:48:26 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pavithra.vetriselvan&quot; class=&quot;user-hover&quot; rel=&quot;pavithra.vetriselvan&quot;&gt;pavithra.vetriselvan&lt;/a&gt; Wow another complication! This is already a pretty complicated project and the text escaping is one of the strangest parts of it. If we have to add some kind of version negotiation it&apos;s going to be harder still. But maybe that&apos;s a separate project?&lt;/p&gt;

&lt;p&gt;Re: &quot;Have we confirmed that this behavior exists in previous supported versions?&quot;&lt;br/&gt;
What behavior do you mean? There is a lot going on in this ticket and I want to confirm what you&apos;re asking. I don&apos;t think the mongos ever did anything but forwarding of mongod codes verbatim, if that&apos;s what you mean. I haven&apos;t confirmed anything about previous server versions and their retry behavior. I&apos;m writing a JS test to verify current master branch behavior, and when we have that we can use it to see what older branches did.&lt;/p&gt;

&lt;p&gt;My understanding is that as a recent improvement (&amp;gt;=4.4), mongos partially retries commands 3x before giving up and returning a retryable error code to the client. So it retries a little, but not completely. I&apos;m still verifying this. Retry codes still leak back to the client under those conditions.&lt;/p&gt;

&lt;p&gt;Changing the retry behavior of mongos has not been part of this proposal. It&apos;s only been about remapping the error codes and message strings that reach mongos clients in those cases in which a client would misconstrue them as referring to the state of the client &amp;lt;=&amp;gt; mongos connection.&lt;/p&gt;

&lt;p&gt;I am not sure what implications this would have for PM-1718, which I haven&apos;t been following closely. It may just be that when mongos is at the point of transforming an error to suppress its &quot;Unknown&quot;-marking side effects, it needs to escape occurrences of &quot;not master&quot; OR &quot;not primary&quot; in those error messages.&lt;/p&gt;</comment>
                            <comment id="3373009" author="shane.harvey" created="Wed, 2 Sep 2020 18:59:00 +0000"  >&lt;p&gt;While we&apos;re at it, could we also have mongos transform state-change errors reported through the &quot;writeErrors&quot; and &quot;writeConcernError&quot; fields? For example, when a shard&apos;s primary is shutdown while handling a write operation, mongos can return these kind of responses:&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;{&apos;ok&apos;: 0.0, &apos;errmsg&apos;: &apos;operation was interrupted&apos;, &apos;code&apos;: 11602, &apos;codeName&apos;: &apos;InterruptedDueToReplStateChange&apos;, &apos;topologyVersion&apos;: {&apos;processId&apos;: ObjectId(&apos;5f500f552392533a1b0d66e5&apos;), &apos;counter&apos;: 7}}&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;{&apos;ok&apos;: 1.0, &apos;n&apos;: 0, &apos;writeErrors&apos;: [{&apos;index&apos;: 0, &apos;code&apos;: 11600, &apos;codeName&apos;: &apos;InterruptedAtShutdown&apos;, &apos;errmsg&apos;: &apos;interrupted at shutdown&apos;}]}&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;{&apos;ok&apos;: 1.0, &apos;n&apos;: 2, &apos;writeConcernError&apos;: {&apos;code&apos;: 11602, &apos;codeName&apos;: &apos;InterruptedDueToReplStateChange&apos;, &apos;errmsg&apos;: &apos;operation was interrupted; Error details: { writeConcern: { w: &quot;majority&quot;, wtimeout: 0, provenance: &quot;clientSupplied&quot; } } at demo-set-0&apos;}}&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;Mongos could return the transformed error instead:&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;{&apos;ok&apos;: 0.0, &apos;errmsg&apos;: &apos;operation was interrupted&apos;, &apos;code&apos;: NEW_CODE, &apos;codeName&apos;: &apos;NEW_CODE&apos;}&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;{&apos;ok&apos;: 1.0, &apos;n&apos;: 0, &apos;writeErrors&apos;: [{&apos;index&apos;: 0, &apos;code&apos;: NEW_CODE, &apos;codeName&apos;: &apos;NEW_CODE&apos;, &apos;errmsg&apos;: &apos;interrupted at shutdown&apos;}]}&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;{&apos;ok&apos;: 1.0, &apos;n&apos;: 2, &apos;writeConcernError&apos;: {&apos;code&apos;: NEW_CODE, &apos;codeName&apos;: &apos;NEW_CODE&apos;, &apos;errmsg&apos;: &apos;operation was interrupted; Error details: { writeConcern: { w: &quot;majority&quot;, wtimeout: 0, provenance: &quot;clientSupplied&quot; } } at demo-set-0&apos;}}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="3361335" author="billy.donahue" created="Wed, 26 Aug 2020 23:22:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=divjot.arora&quot; class=&quot;user-hover&quot; rel=&quot;divjot.arora&quot;&gt;divjot.arora&lt;/a&gt; Let me try to confirm my understanding of what you&apos;re asking for. The concern is that mongos might currently return these retriable codes directly without itself retrying them. But maybe under those current circumstances, it&apos;s kind of okay because the originating client will retry them. It&apos;s just sometimes inefficient because the client will unnecessarily reseat its connection to mongos before retrying. The concern is that if we then change the error code from something retryable to something new, then the originating client won&apos;t retry them. So retryable operations won&apos;t be retried. Is that the investigation requested?&lt;/p&gt;
</comment>
                            <comment id="3361134" author="billy.donahue" created="Wed, 26 Aug 2020 21:22:36 +0000"  >&lt;p&gt;Some pointers from &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ben.caimano&quot; class=&quot;user-hover&quot; rel=&quot;ben.caimano&quot;&gt;ben.caimano&lt;/a&gt; (Slack conversation):&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;figured I&apos;d drop some obvious links:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;getStatusFromCommandResult()&lt;/tt&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ab0b6e3153ea228c1421ed2a37e916affb295d9a/src/mongo/rpc/get_status_from_command_result.h#L47&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; is the first step to parsing remote requests just about everywhere. It&apos;s a bit too ubiquitous to be good for emitting exceptions but it&apos;s a start.&lt;/li&gt;
	&lt;li&gt;Sharding relies heavily on &lt;tt&gt;gatherResponses()&lt;/tt&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/s/cluster_commands_helpers.cpp#L173-L235&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; (and to a lesser extent &lt;tt&gt;appendRawResponses()&lt;/tt&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c8b7857db7d31c5b80dba7dd012223a108a95cfd/src/mongo/s/cluster_commands_helpers.cpp#L555-L671&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;). These probably could emit exceptions immediately.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&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">
                                        <issuelink>
            <issuekey id="1449124">SERVER-50459</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1493437">SERVER-51179</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1453285">SERVER-50550</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1461212">SERVER-50735</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1787412">SERVER-57772</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>24.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>12.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>
    
                        </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[[5002K00000nnUXNQA2]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 26 Aug 2020 19:40:36 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 21 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_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, 21 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>166.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ben.caimano@mongodb.com</customfieldvalue>
            <customfieldvalue>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>divjot.arora@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>isabel.atkinson@mongodb.com</customfieldvalue>
            <customfieldvalue>pavithra.vetriselvan@mongodb.com</customfieldvalue>
            <customfieldvalue>shane.harvey@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hy2ae7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hyk2v3:</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="4266">Service arch 2020-09-07</customfieldvalue>
    <customfieldvalue id="4268">Service arch 2020-10-05</customfieldvalue>
    <customfieldvalue id="4270">Service arch 2020-11-02</customfieldvalue>
    <customfieldvalue id="4271">Service arch 2020-11-16</customfieldvalue>
    <customfieldvalue id="4274">Service arch 2020-12-28</customfieldvalue>
    <customfieldvalue id="4501">Service Arch 2021-02-22</customfieldvalue>
    <customfieldvalue id="4502">Service Arch 2021-03-08</customfieldvalue>
    <customfieldvalue id="4503">Service Arch 2021-03-22</customfieldvalue>
    <customfieldvalue id="4504">Service Arch 2021-04-05</customfieldvalue>
    <customfieldvalue id="4685">Service Arch 2021-04-19</customfieldvalue>
    <customfieldvalue id="4687">Service Arch 2021-05-17</customfieldvalue>
    <customfieldvalue id="5031">Service Arch 2021-05-31</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|hy1wnj:</customfieldvalue>

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