<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:32:07 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-53894] setFCV transitions to fully upgraded/downgraded too early on command retry </title>
                <link>https://jira.mongodb.org/browse/SERVER-53894</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, when a setFCV command fails, we can expect the FCV to end up in the intermediary &quot;upgrading&quot;/&quot;downgrading&quot; states. This should be safe because we expect the setFCV command to be idempotent and a user can simply call the setFCV command again to complete the upgrade.&lt;/p&gt;

&lt;p&gt;In &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-51474&quot; title=&quot;Create FCV transition table at startup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-51474&quot;&gt;&lt;del&gt;SERVER-51474&lt;/del&gt;&lt;/a&gt;, we refactored and simplified a lot of the FCV code. This included adding an &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2c268821e6c78d8f739f3cfed33793f2af004855/src/mongo/db/commands/set_feature_compatibility_version_command.cpp#L245&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;upgradeFeatureCompatibilityVersionDocument&lt;/a&gt; function that will &lt;a href=&quot;https://github.com/mongodb/mongo/blob/f75145df24d968c4c8b659f6528f7e86da02aa46/src/mongo/db/commands/feature_compatibility_version.cpp#L258-L268&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;update the FCV document to the next version if the requested version is a viable transition and is different from the current version&lt;/a&gt;. The setFCV command will call this twice &#8211; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2c268821e6c78d8f739f3cfed33793f2af004855/src/mongo/db/commands/set_feature_compatibility_version_command.cpp#L245&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;once as we expect to transition from downgraded -&amp;gt; upgrading&lt;/a&gt;, and then &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2c268821e6c78d8f739f3cfed33793f2af004855/src/mongo/db/commands/set_feature_compatibility_version_command.cpp#L304&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;another time to transition from upgrading -&amp;gt; upgraded&lt;/a&gt;.&#160;&lt;/p&gt;

&lt;p&gt;This is problematic because we often add upgrade/downgrade logic in the middle of a setFCV call. Examples are when we have to do a reconfig after transitioning to the &quot;upgrading&quot; state in the safe reconfig project and as part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50423&quot; title=&quot;Change memberConfig&amp;#39;s slaveDelay field to secondaryDelaySecs in FCV 4.7&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50423&quot;&gt;&lt;del&gt;SERVER-50423&lt;/del&gt;&lt;/a&gt;. The following scenario will have upgrade/downgrade concerns:&lt;br/&gt;
 1. Call setFCV(upgradeVersion).&#160;&lt;tt&gt;upgradeFeatureCompatibilityVersionDocument(upgradeVersion)&lt;/tt&gt; is called and sets FCV to upgrading. setFCV fails and returns an error before it can complete.&lt;br/&gt;
 2. Call setFCV(upgrade) again. &lt;tt&gt;upgradeFeatureCompatibilityVersionDocument(upgradeVersion)&lt;/tt&gt; now transitions from upgrading to upgraded. Node fails again before setFCV completes.&lt;br/&gt;
 3. Node is now fully upgraded but never completes the additional upgrade/downgrade behavior as part of the setFCV command.&lt;/p&gt;

&lt;p&gt;Ultimately, we do not want to ever enter the fully upgraded/downgraded FCV until the command has succeeded (and all upgrade/downgrade behavior is performed).&lt;/p&gt;</description>
                <environment></environment>
        <key id="1594299">SERVER-53894</key>
            <summary>setFCV transitions to fully upgraded/downgraded too early on command retry </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="ali.mir@mongodb.com">Ali Mir</assignee>
                                    <reporter username="jason.chan@mongodb.com">Jason Chan</reporter>
                        <labels>
                    </labels>
                <created>Tue, 19 Jan 2021 23:41:06 +0000</created>
                <updated>Sun, 29 Oct 2023 21:58:39 +0000</updated>
                            <resolved>Fri, 5 Feb 2021 14:33:28 +0000</resolved>
                                    <version>4.9.0</version>
                                    <fixVersion>4.9.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3600995" author="xgen-internal-githook" created="Fri, 5 Feb 2021 08:23:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ali Mir&apos;, &apos;email&apos;: &apos;ali.mir@mongodb.com&apos;, &apos;username&apos;: &apos;ali-mir&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-53894&quot; title=&quot;setFCV transitions to fully upgraded/downgraded too early on command retry &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-53894&quot;&gt;&lt;del&gt;SERVER-53894&lt;/del&gt;&lt;/a&gt; Ensure updateFeatureCompatibilityVersionDocument() is idempotent&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/23d20aefc26f110da7ffee7c9b7ba1c33751b538&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/23d20aefc26f110da7ffee7c9b7ba1c33751b538&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3572668" author="jason.chan" created="Tue, 19 Jan 2021 23:48:41 +0000"  >&lt;p&gt;For additional context, on v4.4 before the refactor, setFCV will call the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bddffe1ebc6a14da54d47ebd3a1ba80bb2efaff8/src/mongo/db/commands/feature_compatibility_version.cpp#L69&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;setTargetUpgrade&lt;/a&gt; function which always sets the version to &quot;upgrading&quot;. Therefore, we will never fully transition to fully upgraded/fully downgraded before running all our required upgrade/downgrade behavior.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1529965">SERVER-52349</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1447672">SERVER-50423</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_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>Tue, 2 Feb 2021 16:17:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 5 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-1718</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, 5 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>ali.mir@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jason.chan@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hyq8lj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hybxan:</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="4622">Repl 2021-02-08</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|hypuuv:</customfieldvalue>

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