<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:12:54 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-46955] Create the MongosTopologyCoordinator</title>
                <link>https://jira.mongodb.org/browse/SERVER-46955</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Move the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/83854e39d2904b5d4a6e4ee1f9b4fedaa4df85a5/src/mongo/s/commands/cluster_is_master_cmd.cpp#L62&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongosTopologyVersion&lt;/a&gt; into a class, MongosTopologyCoordinator, which is responsible for constructing isMaster responses. Make isMaster requests wait on a Future for topology changes, similar to the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/83854e39d2904b5d4a6e4ee1f9b4fedaa4df85a5/src/mongo/db/repl/replication_coordinator_impl.cpp#L2071-L2072&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ReplicationCoordinator&lt;/a&gt;. Consider sharing code with the ReplicationCoordinator.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1280612">SERVER-46955</key>
            <summary>Create the MongosTopologyCoordinator</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="pavithra.vetriselvan@mongodb.com">Pavithra Vetriselvan</assignee>
                                    <reporter username="tess.avitabile@mongodb.com">Tess Avitabile</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Mar 2020 18:15:17 +0000</created>
                <updated>Sun, 29 Oct 2023 22:10:36 +0000</updated>
                            <resolved>Thu, 23 Apr 2020 18:27:32 +0000</resolved>
                                                    <fixVersion>4.7.0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3053087" author="xgen-internal-githook" created="Thu, 23 Apr 2020 17:59:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Pavi Vetriselvan&apos;, &apos;email&apos;: &apos;pvselvan@umich.edu&apos;, &apos;username&apos;: &apos;pvselvan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46955&quot; title=&quot;Create the MongosTopologyCoordinator&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46955&quot;&gt;&lt;del&gt;SERVER-46955&lt;/del&gt;&lt;/a&gt; Create MongosTopologyCoordinator&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/622592c8cd4801d88d5a5cdf9933ec200f1aa2b0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/622592c8cd4801d88d5a5cdf9933ec200f1aa2b0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3046929" author="pavithra.vetriselvan" created="Mon, 20 Apr 2020 13:44:21 +0000"  >&lt;p&gt;Code review url: &lt;a href=&quot;https://mongodbcr.appspot.com/578970001/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/578970001/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3037767" author="tess.avitabile" created="Mon, 13 Apr 2020 21:34:17 +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;, thank you for checking in about these questions.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Currently, in cluster_is_master_cmd.cpp, we do not wait for the mongosTopologyVersion to change since mongos never previously changed the topology version. With this project, we will change the topology version on mongos (once we enter Quiesce mode?) so mongos must respond to isMaster requests with ok: 0.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That&apos;s correct, since the topology version on mongos never changes, today we just sleep for maxAwaitTimeMS.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Question #1: Until we implement Quiesce Mode on mongos, will we just timeout waiting for the isMaster response? I&apos;m assuming the topologyVersion still wouldn&apos;t change.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That&apos;s correct, until we start calling &lt;tt&gt;MongosTopologyCoordinator::enterQuiesceMode()&lt;/tt&gt;, the topology version on mongos will never change, so &lt;tt&gt;MongosTopologyCoordinator::awaitIsMasterResponse()&lt;/tt&gt; will always time out and return a response after &lt;tt&gt;maxAwaitTimeMS&lt;/tt&gt;.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Question #2: This above metadata is unnecessary for the mongos implementation, but is there anything else we should be including?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The only information necessary to include is the information mongos currently includes in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/83854e39d2904b5d4a6e4ee1f9b4fedaa4df85a5/src/mongo/s/commands/cluster_is_master_cmd.cpp#L177&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;result&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Question #3: Sanity check. Mongos doesn&apos;t support horizons, right?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Correct&lt;/p&gt;</comment>
                            <comment id="3037630" author="pavithra.vetriselvan" created="Mon, 13 Apr 2020 20:14:11 +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;, just wanted to summarize my understanding of the goals here and propose a solution:&lt;/p&gt;

&lt;p&gt;Currently, in &lt;tt&gt;cluster_is_master_cmd.cpp&lt;/tt&gt;, we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/83854e39d2904b5d4a6e4ee1f9b4fedaa4df85a5/src/mongo/s/commands/cluster_is_master_cmd.cpp#L158-L167&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;do not wait&lt;/a&gt; for the &lt;tt&gt;mongosTopologyVersion&lt;/tt&gt; to change since mongos never previously changed the topology version. With this project, we will change the topology version on mongos (once we enter Quiesce mode?) so mongos must respond to isMaster requests with &lt;tt&gt;ok: 0&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Question #1: Until we implement Quiesce Mode on mongos, will we just timeout waiting for the isMaster response? I&apos;m assuming the topologyVersion still wouldn&apos;t change.&lt;/p&gt;

&lt;p&gt;Since mongos should start constructing isMaster responses depending on topology version changes, we would like to create a new class, &lt;tt&gt;MongosTopologyCoordinator&lt;/tt&gt;. From my understanding, this class will be responsible for maintaining &lt;tt&gt;mongosTopologyVersion&lt;/tt&gt; and returning &lt;tt&gt;isMaster&lt;/tt&gt; responses based on changes to it.&lt;/p&gt;

&lt;p&gt;We will need to implement something like &lt;tt&gt;MongosTopologyCoordinator::awaitIsMasterResponse&lt;/tt&gt;. It seems like for mongos, we really only care about the topology version changing. In replication, we append extra information to the response about the node&apos;s state, last majority write, other members, etc. &lt;/p&gt;

&lt;p&gt;Question #2: This above metadata is unnecessary for the mongos implementation, but is there anything else we should be including?&lt;/p&gt;

&lt;p&gt;Question #3: Sanity check. Mongos doesn&apos;t support horizons, right?&lt;/p&gt;

&lt;p&gt;Re: sharing code with ReplicationCoordinator:&lt;br/&gt;
Since a lot of the replication coordinator&apos;s version for &lt;tt&gt;awaitIsMasterResponse&lt;/tt&gt; seems specific to replica set nodes, I think it would be easier to see what code is actually shared between the two implementations. We could then consider making it cleaner in a follow-up commit. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1280627">SERVER-46956</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1328019">SERVER-47750</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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 13 Apr 2020 20:14:11 +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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1703</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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>pavithra.vetriselvan@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|hx9ldj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwxckn:</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>
    <customfieldvalue id="3881">Repl 2020-05-04</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|hx97mv:</customfieldvalue>

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