<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:51:59 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-61262] 5.0/5.1 binary might receive tenant migration state document of 5.2 FCV format, leading to crash.</title>
                <link>https://jira.mongodb.org/browse/SERVER-61262</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Here is the scenario that I am thinking&lt;br/&gt;
(Assume  currently the recipient (R) replica set is running 5.2 Binary and FCV 5.2)&lt;br/&gt;
1) R primary receives recipientSyncData cmd with protocol as &apos;Merge&apos;.&lt;br/&gt;
2) R POS instance started and have persisted the initial state doc with &apos;Merge&apos; protocol&apos;.&lt;br/&gt;
3) Now, R primary receives &apos;setFeatureCompatibilityVersion&apos; cmd to downgrade to 5.0.&lt;br/&gt;
4) R primary goes to &lt;a href=&quot;https://github.com/10gen/mongo/blob/3da4a40253610f89c51775906e039ef53d79c960/src/mongo/db/commands/set_feature_compatibility_version_command.cpp#L340&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;FCV downgrading state&lt;/a&gt;.&lt;br/&gt;
5) FCV code Signals all active tenant migrations to &lt;a href=&quot;https://github.com/10gen/mongo/blob/3da4a40253610f89c51775906e039ef53d79c960/src/mongo/db/commands/set_feature_compatibility_version_command.cpp#L508&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;abort&lt;/a&gt; (but it doesn&apos;t wait for it to get aborted or the state doc to mark as garbage collect)&lt;br/&gt;
6) R primary successfully able to &lt;a href=&quot;https://github.com/10gen/mongo/blob/3da4a40253610f89c51775906e039ef53d79c960/src/mongo/db/commands/set_feature_compatibility_version_command.cpp#L380&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;downgrade to 5.0&lt;/a&gt;&lt;br/&gt;
7) Now, R POS instance receives the abort signal and aborts the current tenant migration before we persist  the &apos;&lt;a href=&quot;https://github.com/10gen/mongo/blob/3da4a40253610f89c51775906e039ef53d79c960/src/mongo/db/repl/tenant_migration_recipient_service.cpp#L2109&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;RecipientPrimaryStartingFCV&lt;/a&gt;&apos; info in the state doc (and before compare D (donor) &amp;amp; R FCV check).&lt;br/&gt;
8) R primary steps down.&lt;br/&gt;
9) At this point, we have a recipient tenant migration state doc on-disk in the which is not marked as garbage collected. So, we consider the migration as active and can resume on new-primary.&lt;/p&gt;

&lt;p&gt;Since the replica set is already downgraded to 5.0. We are free to replace the recipient binaries from 5.2 to 5.0. Now if new primary steps up is in 5.0 binary, a pos instance will be started for the state doc w/ 5.2 on 5.0 binary.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1918668">SERVER-61262</key>
            <summary>5.0/5.1 binary might receive tenant migration state document of 5.2 FCV format, leading to crash.</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="13203">Gone away</resolution>
                                        <assignee username="backlog-server-serverless">[DO NOT USE] Backlog - Server Serverless</assignee>
                                    <reporter username="suganthi.mani@mongodb.com">Suganthi Mani</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Nov 2021 22:26:26 +0000</created>
                <updated>Fri, 27 Oct 2023 20:45:51 +0000</updated>
                            <resolved>Fri, 3 Mar 2023 14:51:04 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4362761" author="jesse" created="Thu, 17 Feb 2022 21:43:25 +0000"  >&lt;p&gt;Maybe this has been fixed? &lt;b&gt;If&lt;/b&gt; we released all state doc format changes in 5.2, and we start using Shard Merge in 5.3 or later in production, then this isn&apos;t a bug. We won&apos;t downgrade a Serverless shard to 5.0. We&apos;ll only downgrade to the last-continuous release. But let&apos;s make sure last-continuous has all the format changes.&lt;/p&gt;</comment>
                            <comment id="4181971" author="jesse" created="Wed, 10 Nov 2021 23:18:57 +0000"  >&lt;p&gt;Note, this is low priority and we can put it off until the end of Shard Merge if desired.&lt;/p&gt;</comment>
                            <comment id="4175895" author="suganthi.mani" created="Mon, 8 Nov 2021 20:30:02 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt; done!&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Proposed Solution:&lt;/b&gt;&lt;br/&gt;
&lt;del&gt;1) Persist the RecipientPrimaryStartingFCV info during the state doc &lt;a href=&quot;https://github.com/10gen/mongo/blob/3da4a40253610f89c51775906e039ef53d79c960/src/mongo/db/repl/tenant_migration_recipient_service.cpp#L2042&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;initialization&lt;/a&gt;. On step up, the POS instance is started only when if the current FCV and on-disk state doc FCV matches. (backport the fix to 5.0 &amp;amp; 5.1)&lt;/del&gt;&lt;br/&gt;
&lt;del&gt;2) Add protocol as ignore:true in lower binary versions (5.1 &amp;amp; 5.0)&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;Abort and wait for migration to be marked as garbage collect (and set expireAt=now) before fcv is set to &quot;downgrading&quot; state. This fix needs to be done on both donor and recipient sides.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1793770">SERVER-57991</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25131"><![CDATA[Serverless]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 8 Nov 2021 13:48:47 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 50 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-2353</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</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>
                            1 year, 50 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-serverless</customfieldvalue>
            <customfieldvalue>jesse@mongodb.com</customfieldvalue>
            <customfieldvalue>suganthi.mani@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0978f:</customfieldvalue>

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

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