<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:32:06 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-33044] Move the fcvLock from being held for the duration of setFCV to only while setting targetVersion</title>
                <link>https://jira.mongodb.org/browse/SERVER-33044</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently setFCV and addShard take the fcvLock in exclusive mode so that they don&apos;t run together at all. &lt;/p&gt;

&lt;p&gt;This ticket must make sure that addShard is safe to run entirely before or after setFCV sets a targetVersion. addShard should be explored to ensure it&apos;s safe, and make necessary modifications. One such mod might be to make sure addShard sends a valid FCV when it calls setFCV on the new shard &amp;#8211; if in transition, does the function used to acquire a version to put in the call return some non &quot;3.6&quot;/&quot;4.0&quot; string?&lt;/p&gt;

&lt;p&gt;shardCollection also takes the fcvLock, specifically for the v3.4 &amp;lt;=&amp;gt; v3.6 transition, due to UUIDs. This will be pulled out eventually (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33045&quot; title=&quot;Remove fcvLock from shardCollection after FCV 3.4 is removed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33045&quot;&gt;&lt;del&gt;SERVER-33045&lt;/del&gt;&lt;/a&gt;) but needs to continue working correctly until then. Make sure this doesn&apos;t break that either.&lt;/p&gt;</description>
                <environment></environment>
        <key id="490420">SERVER-33044</key>
            <summary>Move the fcvLock from being held for the duration of setFCV to only while setting targetVersion</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="dianna.hohensee@mongodb.com">Dianna Hohensee</assignee>
                                    <reporter username="dianna.hohensee@mongodb.com">Dianna Hohensee</reporter>
                        <labels>
                    </labels>
                <created>Wed, 31 Jan 2018 20:24:14 +0000</created>
                <updated>Fri, 16 Feb 2018 19:05:31 +0000</updated>
                            <resolved>Fri, 16 Feb 2018 19:05:31 +0000</resolved>
                                                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1808354" author="dianna.hohensee" created="Fri, 16 Feb 2018 19:05:31 +0000"  >&lt;p&gt;Closing as Won&apos;t Fix because we no longer want to minimize the duration of fcvLock in setFCV. It would require introducing a mutex replacement to prevent more than one thread executing the command at a time, and we don&apos;t want a mutex and fcvLock being held at the same time.&lt;/p&gt;</comment>
                            <comment id="1804623" author="dianna.hohensee" created="Tue, 13 Feb 2018 18:44:16 +0000"  >&lt;p&gt;Note: we must reintroduce the original setFCV command specific mutex, &apos;_kFeatureCompatibilityVersionLock&apos;, to prevent setFCV from running with itself. &apos;_kFeatureCompatibilityVersionLock&apos; was repurposed into the current &apos;fcvLock&apos; &lt;a href=&quot;https://github.com/mongodb/mongo/commit/a6db2621e6376df07f368ab4c4028843015dfa51#diff-719021544bb1675982edfeb62308c6caL184&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1791821" author="esha.maharishi@10gen.com" created="Thu, 1 Feb 2018 15:45:12 +0000"  >&lt;p&gt;I think it&apos;d be better defensive programming to lock around any changes to the fcv state.&lt;/p&gt;

&lt;p&gt;In general, you should always take a lock when writing a variable that can be accessed from multiple threads (in this case, the variable is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.7.1/src/mongo/db/server_options.h#L220&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ServerGlobalParams::FeatureCompatibility::_version&lt;/a&gt;), regardless of whether the any code cares about the particular write being done.&lt;/p&gt;</comment>
                            <comment id="1791801" author="dianna.hohensee" created="Thu, 1 Feb 2018 15:32:48 +0000"  >&lt;p&gt;We are not adding the lock around &lt;b&gt;unsetting&lt;/b&gt; targetVersion. The existing use cases where this is needed are only differentiating between upgrading/upgraded and downgrading/downgraded. There is no need for locking unsetting because there is no need to lock the change from upgrading to upgraded, or the downgrading equivalent.&lt;/p&gt;</comment>
                            <comment id="1791785" author="esha.maharishi@10gen.com" created="Thu, 1 Feb 2018 15:25:13 +0000"  >&lt;p&gt;Also, I think shardCollection already correctly handles seeing an &quot;upgrading&quot; or &quot;downgrading&quot; state (&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.7.1/src/mongo/db/s/config/configsvr_shard_collection_command.cpp#L648&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;it propagates the UUID if &apos;upgrading&apos; or &apos;fullyUpgraded&apos;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Perhaps addShard should do something similar - send setFCV(&amp;lt;theUpgradeVersion&amp;gt;) if upgrading or fullyUpgraded, else send setFCV(&amp;lt;theDowngradeVersion&amp;gt;)?&lt;/p&gt;
</comment>
                            <comment id="1791774" author="esha.maharishi@10gen.com" created="Thu, 1 Feb 2018 15:19:31 +0000"  >&lt;p&gt;This ticket means &quot;while setting &lt;b&gt;or unsetting&lt;/b&gt; targetVersion&quot;, right?&lt;/p&gt;

&lt;p&gt;E.g., during setFCV:&lt;/p&gt;

&lt;p&gt;1) take the fcvLock in X mode&lt;br/&gt;
2) set &apos;targetVersion&apos; field (indicates upgrading or downgrading), and set &apos;version&apos; field to the desired version. this write will also update the in-memory fcv state variable&lt;br/&gt;
3) release fcvLock&lt;br/&gt;
4) // do upgrade/downgrade work&lt;br/&gt;
5) take fcvLock in X mode&lt;br/&gt;
6) unset &apos;targetVersion&apos; field (indicates fully upgraded or fully downgraded), and set &apos;version&apos; field to the desired version. this write will also update the in-memory fcv state variable&lt;br/&gt;
7) release fcvLock&lt;/p&gt;

&lt;p&gt;This way, any readers of the in-memory fcv state variable must see one of the fcv states: fully downgraded, upgrading, fully upgraded, or downgrading.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="490407">SERVER-33043</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>6.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 1 Feb 2018 15:19:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 51 weeks, 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-936</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>dianna.hohensee@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 51 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htp9if:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9kjr:</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="2124">Storage 2018-02-26</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|htovn3:</customfieldvalue>

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