<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:42:05 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-36119] addShard should fail if the added shard&apos;s FCV is higher than that of the cluster</title>
                <link>https://jira.mongodb.org/browse/SERVER-36119</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In the &lt;tt&gt;addShard&lt;/tt&gt; command, we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a1fad21d12d53d755634740e6b6fe1bc970494c8/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp#L722&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;run &lt;tt&gt;setFeatureCompatibilityVersion&lt;/tt&gt;&lt;/a&gt; on the replica set to ensure it has the same &lt;tt&gt;featureCompatibilityVersion&lt;/tt&gt; as the config server. Once this succeeds, we add the shard to &lt;tt&gt;config.shards&lt;/tt&gt;. However, &lt;tt&gt;setFeatureCompatibilityVersion&lt;/tt&gt; only requires that the update to &lt;tt&gt;admin.system.version&lt;/tt&gt; reach a majority of nodes in order to return success. If there are any lower-version &lt;tt&gt;mongoses&lt;/tt&gt; in the cluster, then when they observe the existence of a new shard, they will connect to it and crash if they encounter a node with a higher-version feature compatibility version. We should make the &lt;tt&gt;setFeatureCompatibilityVersion&lt;/tt&gt; command use a w:all &lt;tt&gt;writeConcern&lt;/tt&gt;, so that it waits for the update to reach all members of the new shard (in addition to the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e98d85842b5c1c0407f2add96acac68a80b0f15c/src/mongo/db/commands/feature_compatibility_version.cpp#L241&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;w:majority&lt;/tt&gt; wait&lt;/a&gt; that ensures the update is committed).&lt;/p&gt;</description>
                <environment></environment>
        <key id="571327">SERVER-36119</key>
            <summary>addShard should fail if the added shard&apos;s FCV is higher than that of the cluster</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-catalog-and-routing">Backlog - Catalog and Routing</assignee>
                                    <reporter username="tess.avitabile@mongodb.com">Tess Avitabile</reporter>
                        <labels>
                            <label>ShardingRoughEdges</label>
                            <label>oldshardingemea</label>
                    </labels>
                <created>Fri, 13 Jul 2018 15:49:27 +0000</created>
                <updated>Thu, 26 Oct 2023 10:00:55 +0000</updated>
                                                                            <component>Sharding</component>
                    <component>Upgrade/Downgrade</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="1964144" author="xgen-internal-githook" created="Thu, 2 Aug 2018 17:13:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;kaloianm&apos;, &apos;name&apos;: &apos;Kaloian Manassiev&apos;, &apos;email&apos;: &apos;kaloian.manassiev@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36119&quot; title=&quot;addShard should fail if the added shard&amp;#39;s FCV is higher than that of the cluster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36119&quot;&gt;SERVER-36119&lt;/a&gt; Explicitly downgrade new shard&apos;s FCV in the mixed version convert_to_and_from_sharded.js&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/aee1a8d71d0b7c6c806e9790cb1310c94f36090a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/aee1a8d71d0b7c6c806e9790cb1310c94f36090a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1962922" author="tess.avitabile" created="Wed, 1 Aug 2018 15:25:13 +0000"  >&lt;p&gt;Yes&lt;/p&gt;</comment>
                            <comment id="1962831" author="kaloian.manassiev" created="Wed, 1 Aug 2018 14:40:35 +0000"  >&lt;p&gt;I agree that we can at least fix the test for now by explicitly setting the FCV on the replica set &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ed055ca17c3ce216ccd7ad12b6bc3f7fa27e6e50/jstests/sharding/convert_to_and_from_sharded.js#L32&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;being added&lt;/a&gt; to be the &apos;last-stable&apos; FCV.&lt;/p&gt;

&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 is what you had in mind, right?&lt;/p&gt;</comment>
                            <comment id="1962757" author="tess.avitabile" created="Wed, 1 Aug 2018 14:07:04 +0000"  >&lt;p&gt;We could fix the test by setting FCV on the replica set to the downgrade version before adding it to the cluster. If we implement the solution &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schwerin&quot; class=&quot;user-hover&quot; rel=&quot;schwerin&quot;&gt;schwerin&lt;/a&gt; suggests, we would need to make that change to the test anyway.&lt;/p&gt;</comment>
                            <comment id="1962746" author="ian@10gen.com" created="Wed, 1 Aug 2018 14:03:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=greg.mckeon&quot; class=&quot;user-hover&quot; rel=&quot;greg.mckeon&quot;&gt;greg.mckeon&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&lt;/a&gt;: can you please consider pulling this forward?  convert_to_and_from_sharded.js is just a total mess right now:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://evergreen.mongodb.com/task_history/mongodb-mongo-master/sharding_last_stable_mongos_and_mixed_shards?revision=e8379141cd2fd3f841c87a2817cc04c4830ed72e#/convert_to_and_from_sharded.js=fail&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://evergreen.mongodb.com/task_history/mongodb-mongo-master/sharding_last_stable_mongos_and_mixed_shards?revision=e8379141cd2fd3f841c87a2817cc04c4830ed72e#/convert_to_and_from_sharded.js=fail&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1955519" author="schwerin" created="Tue, 24 Jul 2018 19:21:04 +0000"  >&lt;p&gt;Ah. OK. To summarize and offline conversation, if a replica set started with --shardsrv w/ 4.0 binaries wasn&apos;t previously used as a standalone replica set, it will report fcv 3.6. As such, this problem only occurs when trying to add a shard that contains some user data already. I think in that case, we should not downgrade the fcv on the target shardautomatically, but instead refuse to add the shard if its fcv is higher than the cluster&apos;s fcv. If a user wants to add an fcv 4.0 shard to and fcv 3.6 cluster, they should first need to lower the fcv on that shard to 3.6 and remove any 4.0-specific data and indexes.&lt;/p&gt;</comment>
                            <comment id="1954047" author="tess.avitabile" created="Mon, 23 Jul 2018 18:41:36 +0000"  >&lt;p&gt;Yes, we have always let you do this.&lt;/p&gt;</comment>
                            <comment id="1954013" author="schwerin" created="Mon, 23 Jul 2018 18:13:31 +0000"  >&lt;p&gt;Oh, I&apos;m surprised we let you add shards in fCV 4.0 to a fCV 3.6 cluster. I&apos;m still hesitant to require a successful &quot;writeConcern: all&quot; write to addShard, though if we have to allow fCV 4.0 shards to be added to fCV 3.6 replica sets, we may have no choice.&lt;/p&gt;</comment>
                            <comment id="1953612" author="tess.avitabile" created="Mon, 23 Jul 2018 14:28:09 +0000"  >&lt;p&gt;This is to address the case where the cluster has lower-version FCV and a lower binary version mongos. To be concrete, let&apos;s say the mongods all have binary version 4.0 and FCV 3.6, and the mongoses have binary version 3.6. If we add a shard that has FCV 4.0, the config server sends {{&lt;/p&gt;
{setFeatureCompatibilityVersion: &quot;3.6&quot;}
&lt;p&gt;}} as part of the &lt;tt&gt;addShard&lt;/tt&gt; command. This will succeed as soon as it reaches a majority of the set. But if there is still a node in the set with FCV 4.0, it will cause the 3.6 mongoses in the cluster to crash. This seems like poor behavior&#8211;that the &lt;tt&gt;addShard&lt;/tt&gt; succeeds, but the mongoses in the cluster can crash. I think it would be better to wait for the FCV to reach all nodes in the set before successfully adding the shard.&lt;/p&gt;</comment>
                            <comment id="1947984" author="kaloian.manassiev" created="Mon, 16 Jul 2018 13:55:11 +0000"  >&lt;p&gt;If the config server has the newer FCV this means that all the existing shards should be at the newer FCV already, doesn&apos;t it? In which case it would have been just a matter of time before the old mongos instances crash anyways.&lt;/p&gt;</comment>
                            <comment id="1947431" author="schwerin" created="Sat, 14 Jul 2018 11:54:32 +0000"  >&lt;p&gt;But if one of those nodes is a low version, it&apos;s still going to crash? Why is addShard special in this regard?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26387"><![CDATA[Catalog and Routing]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 14 Jul 2018 11:54:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 27 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2050</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>dbeng-pm-bot</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 27 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>26.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-catalog-and-routing</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@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|hu2lrj:</customfieldvalue>

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

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