<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:48: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-82044] Add a method for checking if a feature flag is enabled without ignoring FCV that handles the case where FCV has not been initialized</title>
                <link>https://jira.mongodb.org/browse/SERVER-82044</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, FeatureFlag::isEnabled() is the method that we use to check whether a feature flag enabled if we don&apos;t want to ignore the FCV. However, the method involves getting the FCV which would &lt;a href=&quot;https://github.com/10gen/mongo/blob/15dadd75e65169698fb1751c29096cd5322dbcc8/src/mongo/db/server_options.h#L147&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;throw if the FCV is uninitialized&lt;/a&gt;. So right now we do the feature flag check by doing serverGlobalParams.featureCompatibility.isVersionInitialized() and then gFeatureFlagName.isEnabled(serverGlobalParams.featureCompatibility). However, it turns out initial sync has a step to &lt;a href=&quot;https://github.com/10gen/mongo/blob/cb2ae455c44581aee0fa66e520175c2b4109bc7c/src/mongo/db/repl/initial_syncer.cpp#L672&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;reset the FCV&lt;/a&gt; so the FCV can become uninitialized in between the two steps, leading to an invariant failure.&#160;&lt;/p&gt;

&lt;p&gt;Here are all the instances of the two-step feature flag check in the 7.0 branch: &lt;a href=&quot;https://github.com/10gen/mongo/blob/220413537b72b7b35b79cc3dfd42549e7b8372e1/src/mongo/db/change_stream_serverless_helpers.cpp#L48-L50&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;1&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/858c7ae1576bdb897a6c8e8162a180aac36dcda8/src/mongo/db/catalog/collection_options.cpp#L54-L56&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;2&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/b02c91f3948f1f70c17ecc5946d80f7ccee656e1/src/mongo/db/catalog/index_catalog_impl.cpp#L1018-L1020&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;3&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/bc836934bcc8423c26cedce898c2233a8ec62e13/src/mongo/db/catalog/index_key_validate.cpp#L165-L168&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;4&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/e5e25d84b3843bed437061611854086c2e929bcb/src/mongo/db/catalog/validate_adaptor.cpp#L543-L546&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;5&lt;/a&gt;, &#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/e5e25d84b3843bed437061611854086c2e929bcb/src/mongo/db/catalog/validate_adaptor.cpp#L715-L717&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;6&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/e5e25d84b3843bed437061611854086c2e929bcb/src/mongo/db/catalog/validate_state.h#L85-L87&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;7&lt;/a&gt;, &#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/056b0578ea08a530dbee00986c0f4a651771628a/src/mongo/db/commands/analyze_cmd.cpp#L141-L143&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;8&lt;/a&gt;, &#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/b7728603c7b6c37cdf73ce9aaf44b9aae60df401/src/mongo/db/pipeline/expression_context.cpp#L285-L286&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;9&lt;/a&gt;, &#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/8cbf0ec019ee2972df1998d686b88df21039b1fd/src/mongo/db/pipeline/pipeline_d.cpp#L1317-L1319&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;10&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/e90e235c9053ffe14be27d3e22d1d7f87e8b60ed/src/mongo/db/query/telemetry.cpp#L483-L485&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;11&lt;/a&gt;, &#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/a8f33f8888f76f07e01edec9b0ba90a8a336e6ae/src/mongo/db/repl/all_database_cloner.cpp#L150-L151&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;12&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/a8f33f8888f76f07e01edec9b0ba90a8a336e6ae/src/mongo/db/repl/all_database_cloner.cpp#L234-L236&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;13&lt;/a&gt;, &#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/4b802111fba9c2c02cc6faecd83724a902dbd223/src/mongo/db/repl/collection_cloner.cpp#L134-L136&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;14&lt;/a&gt;, &#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/d6f6546f16481afc0e8f8aedaaacbbdff40d7639/src/mongo/db/repl/oplog_applier_utils.cpp#L396-L398&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;15&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/9c87b57cd6657a5e090a166f8051ad118fdae52f/src/mongo/db/repl/oplog_entry.cpp#L85-L87&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;16&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/9c87b57cd6657a5e090a166f8051ad118fdae52f/src/mongo/db/repl/oplog_entry.cpp#L219-L220&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;17&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/9c87b57cd6657a5e090a166f8051ad118fdae52f/src/mongo/db/repl/oplog_entry.cpp#L364-L366&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;18&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/efa000d47b895e15ef03edc7b8888e6a139525dc/src/mongo/rpc/op_msg.cpp#L281-L283&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;19&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/6b0141d1559164e212f66d9b62909b9d61df01c8/src/mongo/s/analyze_shard_key_role.cpp#L59-L60&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;20&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/7ed14a4b2c043c639d1c6aa4d22f80f30ca44d97/src/mongo/s/commands/cluster_analyze_cmd.cpp#L75-L77&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;21&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/142401725eb3559eece0ce97cf57628ed58ae89d/src/mongo/util/database_name_util.cpp#L47-L49&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;22&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/142401725eb3559eece0ce97cf57628ed58ae89d/src/mongo/util/database_name_util.cpp#L88-L90&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;23&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/7bdbb9dc513db9ccb36ab66ef5964be3d75a0b8d/src/mongo/util/namespace_string_util.cpp#L41&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;24&lt;/a&gt;,&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/7bdbb9dc513db9ccb36ab66ef5964be3d75a0b8d/src/mongo/util/namespace_string_util.cpp#L65-L67&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;25&lt;/a&gt;. The last two are inside NamespaceStringUtil::serialize() and deserialize() so have a high chance of hitting the race with the initial sync FCV reset.&#160;&lt;/p&gt;

&lt;p&gt;So the proposed solution here is to replace the two-step check with a single check handles the case where FCV is uninitialized.&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2470844">SERVER-82044</key>
            <summary>Add a method for checking if a feature flag is enabled without ignoring FCV that handles the case where FCV has not been initialized</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="3">Duplicate</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="cheahuychou.mao@mongodb.com">Cheahuychou Mao</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 Oct 2023 16:29:26 +0000</created>
                <updated>Wed, 18 Oct 2023 21:54:47 +0000</updated>
                            <resolved>Tue, 10 Oct 2023 21:16:17 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="2399632">SERVER-79274</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2400570">SERVER-79330</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>0.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_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        17 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>huayu.ouyang@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            17 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>105.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>backlog-server-repl</customfieldvalue>
            <customfieldvalue>cheahuychou.mao@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2vgav:</customfieldvalue>

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

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