<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:12:44 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-46893] Allow streamable isMaster to wait on removed/uninitialized nodes</title>
                <link>https://jira.mongodb.org/browse/SERVER-46893</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, if a client has an exhaust isMaster connection with a replica member and the member becomes removed, the server will keep sending responses to the client. A response will be generated &lt;a href=&quot;https://github.com/mongodb/mongo/blob/f59f63db6c37c0d4657b57d559c95d830b0e34c2/src/mongo/db/repl/replication_coordinator_impl.cpp#L2011-L2020&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;right away&lt;/a&gt; instead of waiting.&lt;/p&gt;

&lt;p&gt;After some discussion, we decided on the following solution:&lt;/p&gt;

&lt;p&gt;Removed or uninitialized nodes will respect the TopologyVersion passed in by the isMaster request:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Requests with a stale TopologyVersion counter or a different processId will return immediately with an InvalidConfig response.&lt;/li&gt;
	&lt;li&gt;Requests with a TopologyVersion counter equal to the server TopologyVersion counter will wait up to maxAwaitTimeMS for a topology change. If the request times out, return an InvalidConfig response&lt;/li&gt;
	&lt;li&gt;Requests that send a TopologyVersion counter greater than the server TopologyVersion counter will return an error with ok: 0.&lt;br/&gt;
On a replica set reconfig, the server will close connections from the server side if the horizon mappings for the server have changed. If there was no change to the horizon mappings, we will return ok: 1 and reply with an updated isMaster response.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;On a reconfig that adds a node back into the replica set from REMOVED, the node will get a SplitHorizon Error with ok: 0 and the server will disconnect from the client. &lt;br/&gt;
On a replSetInitiate, nodes will close connections from the server side if the requested horizon does not exist in this new config. Otherwise, return the updated isMaster request with ok: 1.&lt;/p&gt;

&lt;p&gt;Splitting this into two tickets. This ticket will track the work to allow waiting on removed/uninitialized nodes. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47394&quot; title=&quot;Have servers close connections on a SplitHorizonChange error for awaitable isMaster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47394&quot;&gt;&lt;del&gt;SERVER-47394&lt;/del&gt;&lt;/a&gt; will track the work to add a server-side disconnect.&lt;/p&gt;

&lt;p&gt;In the case of a non-awaitable isMaster (no TopologyVersion in the request) but the server does not yet have an initialized config or is in the REMOVED state, we will return a response with the following:&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;&quot;ismaster&quot; : false,&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;&quot;secondary&quot; : false,&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;&quot;info&quot; : &quot;Does not have a valid replica set config&quot;,&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;This will be the same as the old protocol.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1276041">SERVER-46893</key>
            <summary>Allow streamable isMaster to wait on removed/uninitialized nodes</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="jason.chan@mongodb.com">Jason Chan</assignee>
                                    <reporter username="jason.chan@mongodb.com">Jason Chan</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Mar 2020 16:52:09 +0000</created>
                <updated>Sun, 29 Oct 2023 22:10:44 +0000</updated>
                            <resolved>Wed, 15 Apr 2020 18:05:50 +0000</resolved>
                                                    <fixVersion>4.4.0-rc3</fixVersion>
                    <fixVersion>4.7.0</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="3053313" author="xgen-internal-githook" created="Thu, 23 Apr 2020 19:27:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jason Chan&apos;, &apos;email&apos;: &apos;jason.chan@10gen.com&apos;, &apos;username&apos;: &apos;jasonjhchan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46893&quot; title=&quot;Allow streamable isMaster to wait on removed/uninitialized nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46893&quot;&gt;&lt;del&gt;SERVER-46893&lt;/del&gt;&lt;/a&gt; Allow streamable isMaster to wait on removed/uninitialized nodes&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 2bad13a63315132a2793194d8d89f28dd7534928)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47638&quot; title=&quot;Ensure isMaster is waiting before calling replSetInitiate in AwaitableIsMasterOnNodeWithUninitializedConfigInvalidHorizon&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47638&quot;&gt;&lt;del&gt;SERVER-47638&lt;/del&gt;&lt;/a&gt; Ensure isMaster is waiting before calling replSetInitiate in AwaitableIsMasterOnNodeWithUninitializedConfigInvalidHorizon&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 523b9c9f92db20062ad6e3f42ceb80292e1a23f3)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3064008dd3830bee2c18cea531fff565e26d47e5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3064008dd3830bee2c18cea531fff565e26d47e5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3041091" author="xgen-internal-githook" created="Wed, 15 Apr 2020 18:04:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jason Chan&apos;, &apos;email&apos;: &apos;jason.chan@10gen.com&apos;, &apos;username&apos;: &apos;jasonjhchan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46893&quot; title=&quot;Allow streamable isMaster to wait on removed/uninitialized nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46893&quot;&gt;&lt;del&gt;SERVER-46893&lt;/del&gt;&lt;/a&gt; Allow streamable isMaster to wait on removed/uninitialized nodes&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2bad13a63315132a2793194d8d89f28dd7534928&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2bad13a63315132a2793194d8d89f28dd7534928&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3034725" author="tess.avitabile" created="Fri, 10 Apr 2020 13:48:28 +0000"  >&lt;p&gt;Thanks, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jason.chan&quot; class=&quot;user-hover&quot; rel=&quot;jason.chan&quot;&gt;jason.chan&lt;/a&gt;! Can you please update the ticket description with this plan?&lt;/p&gt;</comment>
                            <comment id="3029570" author="jason.chan" created="Tue, 7 Apr 2020 16:16:32 +0000"  >&lt;p&gt;After some discussion, we decided on the following solution:&lt;/p&gt;

&lt;p&gt;Removed or uninitialized nodes will respect the TopologyVersion passed in by the isMaster request: &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Requests with a stale TopologyVersion counter or a different processId will return immediately with an InvalidConfig response.&lt;/li&gt;
	&lt;li&gt;Requests with a TopologyVersion counter equal to the server TopologyVersion counter will wait up to maxAwaitTimeMS for a topology change. If the request times out, return an InvalidConfig response&lt;/li&gt;
	&lt;li&gt;Requests that send a TopologyVersion counter greater than the server TopologyVersion counter will return an error with ok: 0.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;On a replica set reconfig, the server will close connections from the server side if the horizon mappings for the server have changed. If there was no change to the horizon mappings, we will return ok: 1 and reply with an updated isMaster response.&lt;/p&gt;

&lt;p&gt;On a replSetInitiate, nodes will close connections from the server side if the requested horizon does not exist in this new config. Otherwise, return the updated isMaster request with ok: 1.&lt;/p&gt;

&lt;p&gt;Splitting this into two tickets. This ticket will track the work to allow waiting on removed/uninitialized nodes. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47394&quot; title=&quot;Have servers close connections on a SplitHorizonChange error for awaitable isMaster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47394&quot;&gt;&lt;del&gt;SERVER-47394&lt;/del&gt;&lt;/a&gt; will track the work to replace the SplitHorizonChange error with a server-side disconnect.&lt;/p&gt;</comment>
                            <comment id="3022050" author="shane.harvey" created="Wed, 1 Apr 2020 21:54:17 +0000"  >&lt;p&gt;I am also in favor of Proposal 1. I don&apos;t think drivers should pick and choose when to using the streaming protocol based on the connection type as Proposal 2 suggests. I also opened DRIVERS-984 to add driver testing for this scenario. I&apos;m not aware of any driver that tests connecting directly to an uninitialized replica set member.&lt;/p&gt;</comment>
                            <comment id="3021528" author="tess.avitabile" created="Wed, 1 Apr 2020 18:06:34 +0000"  >&lt;p&gt;I still feel pretty on the fence, and I&apos;m interested in including others in the decision. I&apos;ve asked Jason to turn your discussion notes into a short document that we can solicit comments on. Does that sound alright to you, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="3021486" author="jesse" created="Wed, 1 Apr 2020 17:45:29 +0000"  >&lt;p&gt;I think we should do Proposal 1. Arguments for it:&lt;/p&gt;

&lt;p&gt;1. We&apos;ll change two implementations (mongod and mongos) instead of a dozen (the drivers).&lt;br/&gt;
2. More of the protocol&apos;s logic remains in the server with this proposal, which makes server-side improvements easier in the future.&lt;br/&gt;
3. I feel that Proposal 2 is hard to explain, because it mixes two layers we normally consider separately: the protocol layer between a client and one server, and the higher layer where a client connects to a standalone, replica set, or sharded cluster.&lt;/p&gt;

&lt;p&gt;My opinion right now is still based mostly on intuition instead of reason.&lt;/p&gt;</comment>
                            <comment id="3021466" author="jesse" created="Wed, 1 Apr 2020 17:33:27 +0000"  >&lt;p&gt;Answers to Jason: Right, an uninitialized node should also respond with ok: 1, ismaster: false, secondary: false, and topologyVersion, every maxAwaitTimeMS / topologyVersion change.&lt;/p&gt;

&lt;p&gt;&amp;gt; if a client sends an awaitable isMaster to a node (maybe for the first time) that is already REMOVED, we will wait at most maxAwaitTimeMS before the server responds with ok: 1, ismaster: false, secondary: false. Is that acceptable from a driver&apos;s perspective?&lt;/p&gt;

&lt;p&gt;You might be misunderstanding my proposal. I think that a removed/uninit&apos;ed node should implement the streaming isMaster protocol the exact same way as all other nodes. If a client sends an awaitable isMaster to a node that is already REMOVED, then that node replies immediately, the same as any other node does, as we&apos;ve already specified for the streaming isMaster protocol. &lt;b&gt;Then&lt;/b&gt; the node waits until maxAwaitTimeMS or a topologyVersion change, and replies again, and so on.&lt;/p&gt;</comment>
                            <comment id="3021377" author="jason.chan" created="Wed, 1 Apr 2020 16:47:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt;&lt;br/&gt;
For my own clarification:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt; After reconfig that removes this node, respond with ok: 1, ismaster: false, secondary: false, and topologyVersion. Do this every maxAwaitTimeMS / topologyVersion change. The streaming protocol continues. &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I believe this also applies to nodes with uninitialized config, correct? Also, if a client sends an awaitable isMaster to a node (maybe for the first time) that is already REMOVED, we will wait at most maxAwaitTimeMS before the server responds with ok: 1, ismaster: false, secondary: false. Is that acceptable from a driver&apos;s perspective?&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt; Pros: Future-proof for cases where direct connections might start caring about instant notification of topologyVersion changes. &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I think proposal 2 is much simpler to reason about and will result in server code that is easier to follow, but I vote for proposal 1 if we are able to imagine wanting direct connections to start caring about topology changes in the future.&lt;/p&gt;</comment>
                            <comment id="3019843" author="jesse" created="Tue, 31 Mar 2020 19:10:34 +0000"  >&lt;p&gt;2020-03-31 conversation among Tess, Jason, and me:&lt;/p&gt;

&lt;p&gt;Solution requirements:&lt;/p&gt;

&lt;p&gt;1. Clients must be able to do direct connections to removed/uninit&apos;ed nodes. (Direct connections have no horizon param)&lt;br/&gt;
2. After a horizon change, a client using an RS connection with a horizon parameter must reboot the ismaster conversation&lt;br/&gt;
3. Don&apos;t bombard client with replies under any circumstances&lt;/p&gt;

&lt;p&gt;Proposal 1:&lt;/p&gt;

&lt;p&gt;Server logic:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;After reconfig that removes this node, respond with ok: 1, ismaster: false, secondary: false, and topologyVersion. Do this every maxAwaitTimeMS / topologyVersion change. The streaming protocol continues.&lt;/li&gt;
	&lt;li&gt;After a reconfig or initiate, if the client&apos;s last isMaster request included horizon parameter, respond ok: 0, SplitHorizonError, no MoreToCome. Server now waits for a new request on this connection, or for the client to disconnect. When the client receives ok: 0 it disconnects, then sends new a isMaster request on a new connection; the server responds normally to it.&lt;/li&gt;
	&lt;li&gt;After a reconfig or initiate, if the client&apos;s last isMaster request did &lt;b&gt;not&lt;/b&gt; include a horizon parameter, send a reply normally with default horizon.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Satisfies requirements:&lt;br/&gt;
1. Allows direct connections to removed/uninit&apos;d, because such a member responds ok: 1.&lt;br/&gt;
2. Reboots RS connections after horizon changes, because any reconfig that might change horizons triggers ONE ok: 0 response.&lt;br/&gt;
3. We never bombard.&lt;/p&gt;

&lt;p&gt;Pros: Future-proof for cases where direct connections might start caring about instant notification of topologyVersion changes.&lt;br/&gt;
Cons: More server work than Proposal 2.&lt;/p&gt;

&lt;p&gt;Proposal 2:&lt;/p&gt;

&lt;p&gt;Client omits topologyVersion, maxAwaitTimeMS from direct connection conversations. Never initiates streaming on direct conn.&lt;/p&gt;

&lt;p&gt;IsMaster always returns ok: 0 if the request has topologyVersion and this member is removed/uninit&apos;d. Returns ok: 1 even from removed/uninit&apos;d members if request has no topologyVersion/maxAwaitTimeMS.&lt;/p&gt;

&lt;p&gt;This permits direct connections, but also triggers reboot for RS connections if horizon might&apos;ve changed.&lt;/p&gt;

&lt;p&gt;Pros: Less server work, close to Jason&apos;s current patch.&lt;br/&gt;
Cons: More client logic, requires changes from current client implementations.&lt;/p&gt;</comment>
                            <comment id="3019362" author="jesse" created="Tue, 31 Mar 2020 15:58:50 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt; this sounds like a problem. Drivers must be able to directly connect to uninitialized RS members. &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#general-requirements&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Quoth the Server Discovery and Monitoring Spec&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;General Requirements&lt;br/&gt;
Direct connections: A client MUST be able to connect to a single server of any type. This includes querying hidden replica set members, and connecting to uninitialized members (see RSGhost) in order to run &quot;replSetInitiate&quot;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is possible because in the old isMaster protocol, an uninitialized member replies:&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;{&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;  ok: 1,&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;  ismaster: false,&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;  secondary: false,&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;  isreplicaset: true,&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;  ... other fields ...&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;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;The driver recognizes the server as RSGhost. It&apos;s permitted to run commands on it if the driver is &lt;b&gt;directly connected&lt;/b&gt; to it (no &quot;replicaset=&quot; in the MongoDB URI).&lt;/p&gt;

&lt;p&gt;So our goal must be to permit drivers to make direct connections to uninitialized or removed members using the new protocol.&lt;/p&gt;

&lt;p&gt;A possible solution?: An uninitialized or removed member replies the same as above, even when using the streaming protocol. The reply includes ok: 1, ismaster: false, secondary: false, etc., and it has no error code. The server ensures it sends this reply no more frequently than necessary (after the initial handshake, or a topologyVersion change, or maxAwaitTimeMS). The client will consider the member RSGhost as soon as it processes this reply, and it will not select this member when the client is in RS mode (its URI includes &quot;replicaset=&quot;), but the client &lt;b&gt;will&lt;/b&gt; be able to use it for a direct connection.&lt;/p&gt;

&lt;p&gt;We&apos;ve had to change our minds so often that I&apos;m not sure if we&apos;ve already considered this idea and found a fatal flaw.....&lt;/p&gt;

&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; what&apos;s our testing status? Do we already have tests for some drivers that attempt a direct connection to an uninitialized or removed member with the new protocol?&lt;/p&gt;</comment>
                            <comment id="3018516" author="tess.avitabile" created="Tue, 31 Mar 2020 13:05:22 +0000"  >&lt;p&gt;Sorry for so much back and forth on this, but I&apos;m having a small concern about whether this will affect the ability to run replSetInitiate through a driver that uses streamable isMaster. I&apos;m worried about the following case:&lt;/p&gt;

&lt;p&gt;Driver sends isMaster w/o topologyVersion&lt;/p&gt;

&lt;p&gt;Server responds w/ topologyVersion&lt;/p&gt;

&lt;p&gt;Driver sends isMaster w/ topologyVersion&lt;/p&gt;

&lt;p&gt;Server responds w/ error because topologyVersion is requested and config is not yet initialized&lt;/p&gt;

&lt;p&gt;Driver closes monitoring connection&lt;/p&gt;

&lt;p&gt;Driver tries to run replSetInitiate&lt;/p&gt;

&lt;p&gt;Do you expect this will be a problem? Do we usually run replSetInitiate through the drivers, or do drivers connect to sets that are already initiated?&lt;/p&gt;

&lt;p&gt;CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3014080" author="shane.harvey" created="Mon, 30 Mar 2020 22:23:46 +0000"  >&lt;p&gt;SGTM. Both of those responses will cause the driver to mark the server as Unknown. Note that the ok:0 error has the additional effect of causing the driver to close the monitoring connection which sounds fine to me. &lt;/p&gt;</comment>
                            <comment id="3013782" author="jason.chan" created="Mon, 30 Mar 2020 20:16:41 +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;,&#160;this ticket was updated to describe some slight additional changes.&lt;/p&gt;

&lt;p&gt;In addition to the SplitHorizonError we described earlier for servers in the REMOVED state, awaitable isMasters on servers with configs that have not yet been initialized will return a NotYetInitialized error with ok: 0. &lt;/p&gt;

&lt;p&gt;For non-awaitable isMasters (no TopologyVersion in the isMaster request) on servers that do not have a valid replica set config (either not yet initialized or member is REMOVED), we will follow the old protocol and respond with &quot;Does not have a valid replica set config&quot; in the &quot;info&quot; field.&lt;/p&gt;

&lt;p&gt;Let us know if you see any problems with this.&lt;/p&gt;</comment>
                            <comment id="3012587" author="tess.avitabile" created="Mon, 30 Mar 2020 12:30:15 +0000"  >&lt;p&gt;My hope is that that isn&apos;t necessary. As part of this fix, we audited the code and saw that after this change, the server will always either return ok:0 or wait maxAwaitTimeMS for a topologyVersion change.&lt;/p&gt;</comment>
                            <comment id="3005160" author="shane.harvey" created="Fri, 27 Mar 2020 20:51:23 +0000"  >&lt;p&gt;Thanks, that answers it. In general, is it possible to add a safe-guard that avoids these kinds of bugs in the future? Perhaps the server could rate limit the isMaster stream in some way? For example, the server could use a backoff that starts at 0 seconds for X number of consecutive responses and then increases to maxAwaitTimeMS. The backoff could be triggered when too many responses are sent in some small time frame.&lt;/p&gt;</comment>
                            <comment id="3005099" author="jason.chan" created="Fri, 27 Mar 2020 20:26:31 +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; I updated the ticket description. Let me know if this answers your question.&lt;/p&gt;

&lt;p&gt;CC: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3005010" author="shane.harvey" created="Fri, 27 Mar 2020 19:59:45 +0000"  >&lt;p&gt;Can you clarify what the isMaster response is in this case? Is it ok:0 or ok:1? I ask because in the driver&apos;s spec we decided that a client should close the monitoring connection after receiving an ok:0 streaming isMaster response (and wait heartbeatFrequencyMS before running a new isMaster on a new connection).&lt;/p&gt;

&lt;p&gt;CC: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matt.broadstone&quot; class=&quot;user-hover&quot; rel=&quot;matt.broadstone&quot;&gt;matt.broadstone&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1307107">SERVER-47394</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1315871">SERVER-47557</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>18.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 27 Mar 2020 19:59:45 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 41 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>
                            3 years, 41 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>jesse@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jason.chan@mongodb.com</customfieldvalue>
            <customfieldvalue>shane.harvey@mongodb.com</customfieldvalue>
            <customfieldvalue>tess.avitabile@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hx8t87:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwwkzb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3768">Repl 2020-04-06</customfieldvalue>
    <customfieldvalue id="3769">Repl 2020-04-20</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|hx8fhj:</customfieldvalue>

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