<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:36:45 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-77838] Consider changing or removing shouldBeFCVGated parameter</title>
                <link>https://jira.mongodb.org/browse/SERVER-77838</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The `shouldBeFCVGated` parameter was added as part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-68151&quot; title=&quot;Add a required feature flag IDL parameter of &amp;quot;shouldBeFCVGated&#8221;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-68151&quot;&gt;&lt;del&gt;SERVER-68151&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, developers may not be aware that marking `shouldBeFCVGated: false` can be unsafe, and this flag does not necessarily convey this lack of safety the same way that &lt;a href=&quot;https://github.com/10gen/mongo/blob/7f6eac6452a6e6e5739009117cd3b31417a95cac/src/mongo/db/feature_flag.cpp#L94&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;isEnabledAndIgnoreFCVUnsafe&lt;/a&gt; does. &lt;/p&gt;

&lt;p&gt;We should consider whether this parameter should be changed or removed to be safer.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2359773">SERVER-77838</key>
            <summary>Consider changing or removing shouldBeFCVGated parameter</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="1" iconUrl="https://jira.mongodb.org/images/icons/statuses/open.png" description="">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="huayu.ouyang@mongodb.com">Huayu Ouyang</reporter>
                        <labels>
                            <label>repl-shortlist</label>
                    </labels>
                <created>Tue, 6 Jun 2023 15:48:39 +0000</created>
                <updated>Mon, 22 Jan 2024 22:58:35 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="5480013" author="max.hirschhorn@10gen.com" created="Wed, 7 Jun 2023 03:15:31 +0000"  >&lt;p&gt;I agree with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schwerin%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;schwerin@mongodb.com&quot;&gt;schwerin@mongodb.com&lt;/a&gt; about not wanting a function named &quot;Unsafe&quot; to be part of standard server development for certain types of new functionality/features. I think doing so confounds what patterns for how feature flags are used and checked is truly unsafe (e.g. corrupts data, returns incorrect results, etc.). I also do not want &lt;tt&gt;shouldBeFCVGated: false&lt;/tt&gt; feature flags to be calling FeatureFlag::isEnabled(FCV) and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2ef8927c2b6731fb68ed09dcbc80d0fd4c384ab0/src/mongo/db/feature_flag.cpp#L61C6-L65&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;looking like the return value might be dependent on the supplied FCV value but isn&apos;t&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My current thinking is the server should have two different C++ types for feature flags and IDL can generate code which stamps out an instance of one type or the other type. (I&apos;m not attached to their exact names.)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;FeatureFlagBinaryCompatible&lt;/tt&gt; would offer an isReleased() method which returns true if &lt;tt&gt;default: true&lt;/tt&gt; has been set in the IDL file or if the &amp;#45;&amp;#45;setParameter featureFlagXX was specified at startup, and returns false otherwise.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;FeatureFlagFCVGated&lt;/tt&gt; would offer isEnabled(FCV), isEnabledAndIgnoreFCVUnsafe(), and isEnabledAndIgnoreFCVUnsafeAtStartup() as the current FeatureFlag class does today. I would also look to remove the term &quot;Unsafe&quot; from isEnabledAndIgnoreFCVUnsafeAtStartup() because we can generally deem ignoring FCV at startup (e.g. deciding to register a service or background job) to be a safe thing to do.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The IDL option for choosing between these two classes would express some necessary conditions to explain why it is safe to ignore the feature compatibility version. One idea for a name would be &lt;tt&gt;affectsDataReplication: false&lt;/tt&gt;. My goal would be to get the project lead and code reviewers to be thinking &quot;has my feature changes anything about the contents of the oplog?&quot; And then to have that justification be written down.&lt;/p&gt;

&lt;p&gt;Separately, it looks like FeatureFlag::isEnabledUseDefaultFCVWhenUninitialized() is declared but not defined in feature&amp;#95;flag.cpp. Hopefully this means we can delete it? I&apos;d also be curious to understand why the aggregation subsystem is using FeatureFlag::isEnabledOnVersion(FCV) when the documentation comment suggests it is only needing to be used within the context of the set&amp;#95;feature&amp;#95;compatibility&amp;#95;version&amp;#95;command.cpp due to how the in&amp;#45;memory state is modified.&lt;/p&gt;</comment>
                            <comment id="5479202" author="schwerin" created="Tue, 6 Jun 2023 19:25:34 +0000"  >&lt;p&gt;I don&apos;t know that &quot;if your project doesn&apos;t require FCV gating, you check its feature flag with a function that has &apos;unsafe&apos; in the name&quot; does much more than dilute the power of the word &quot;unsafe&quot;. I don&apos;t love the current state of affairs, but keeping a function named &quot;Unsafe&quot; that you&apos;re &lt;em&gt;supposed&lt;/em&gt; to use for what I hope is actually most flag-gated features seems problem-prone.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2553436">SERVER-85569</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2358218">SERVER-77787</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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25128"><![CDATA[Replication]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 6 Jun 2023 19:25:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        35 weeks, 1 day 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_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>max.hirschhorn@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            35 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-repl</customfieldvalue>
            <customfieldvalue>huayu.ouyang@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2cf6f:</customfieldvalue>

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

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