<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:45:43 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-37340] Make FCV upgrade use command oplog entry instead of observing writes to the FCV document</title>
                <link>https://jira.mongodb.org/browse/SERVER-37340</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In the current FCV upgrade logic, the primary node in a replica set executes a command and has the opportunity to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/45fd17ec23c705fa625f3cd475844f737e08edef/src/mongo/db/commands/set_feature_compatibility_version_command.cpp#L134&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;acquire&lt;/a&gt; strong locks for consistency. However, the secondaries only get to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/45fd17ec23c705fa625f3cd475844f737e08edef/src/mongo/db/op_observer_impl.cpp#L427&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;observe&lt;/a&gt; writes to the FCV document which are executed while already holding a hierarchy of locks and as a result, they are not allowed to take any further locks on their own out of risk of introducing deadlocks.&lt;/p&gt;

&lt;p&gt;During 4.0 development we uncovered cases (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34483&quot; title=&quot;Avoid taking DBLocks when clearing in-memory database cache in FCV op observer if possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34483&quot;&gt;&lt;del&gt;SERVER-34483&lt;/del&gt;&lt;/a&gt;) where upgrade requires the acquisition of strong locks on secondaries and because of this, it would be much more convenient if the FCV upgrade logic wrote a command oplog entry, which on the secondary nodes executes serially.&lt;/p&gt;</description>
                <environment></environment>
        <key id="610636">SERVER-37340</key>
            <summary>Make FCV upgrade use command oplog entry instead of observing writes to the FCV document</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="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-repl">Backlog - Replication Team</assignee>
                                    <reporter username="kaloian.manassiev@mongodb.com">Kaloian Manassiev</reporter>
                        <labels>
                            <label>pm-2821-quick-wins</label>
                    </labels>
                <created>Thu, 27 Sep 2018 05:15:31 +0000</created>
                <updated>Tue, 21 Feb 2023 22:06:29 +0000</updated>
                                                                            <component>Upgrade/Downgrade</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="4650335" author="kaloian.manassiev" created="Thu, 30 Jun 2022 13:35:22 +0000"  >&lt;p&gt;Since FCV is a macro operation that potentially impacts the entire instances, it should not be using OpObservers on documents, at the very least because of the locking problem. Because of this, I still believe there is merit to make it use &apos;c&apos; oplog entries.&lt;/p&gt;

&lt;p&gt;Passing this ticket to the replication team, since they own the FCV infrastructure, to possibly be done under PM-2821.&lt;/p&gt;</comment>
                            <comment id="4185434" author="max.hirschhorn@10gen.com" created="Fri, 12 Nov 2021 13:53:36 +0000"  >&lt;blockquote&gt;
&lt;p&gt;it would be much more convenient if the FCV upgrade logic wrote a command oplog entry, which on the secondary nodes executes serially.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The changes from &lt;a href=&quot;https://github.com/mongodb/mongo/commit/ff982a6935c99adebb637adec876c471f282fdc5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ff982a6&lt;/a&gt; as part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40169&quot; title=&quot;Apply commitTransaction of unprepared transactions with CRUD ops in the same batch during recovery and initial sync&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40169&quot;&gt;&lt;del&gt;SERVER-40169&lt;/del&gt;&lt;/a&gt; made it so writes to the admin.system.version collection are applied in their own batch on secondaries.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure this entirely solves the lock upgrade problem mentioned in the description because there can still be readers on secondaries. Assigning this to Sharding EMEA because they had done work on setFCV in the MongoDB 5.0 and I&apos;d like more input from Kal.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="526894">SERVER-34483</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>Fri, 7 Jun 2019 16:07:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 31 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-3236</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>huayu.ouyang@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 31 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-repl</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@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|hu8zdz:</customfieldvalue>

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

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