<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:54:32 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-62233] Make SessionCatalogMigrationSource handleWriteHistory filter out oplogs outside of the chunkRange with OpType &apos;n&apos;</title>
                <link>https://jira.mongodb.org/browse/SERVER-62233</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;b&gt;Background&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The call to &lt;b&gt;getNextSessionOplogBatch&lt;/b&gt; by the destination shard should only return oplogs that adhere to the following conditions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The oplog entry is part of the collection being migrated&lt;/li&gt;
	&lt;li&gt;The oplog entry&apos;s shard key value is in the chunk range that is being migrated&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;The Problem&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The SessionCatalogMigrationSource &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0e0bdb41cf80cfa3e151b3aba3a5ebb77714c06e/src/mongo/db/s/session_catalog_migration_source.cpp#L351&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;won&apos;t filter out the oplog entries&lt;/a&gt; that are outside of the migrating chunk range if the oplog has been rewritten to have a OpType of &apos;n&apos;. Which is what happens as part of session migration.&lt;/p&gt;

&lt;p&gt;This causes the performance issue discovered in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61808&quot; title=&quot;The cloning of sessions of the moveChunk gets slower after some migrations&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61808&quot;&gt;&lt;del&gt;SERVER-61808&lt;/del&gt;&lt;/a&gt;, as each consecutive chunk migration will send an increasing number of unnecessary oplogs that the recipient has to handle.&lt;/p&gt;

&lt;p&gt;Classes Involved:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;SessionCatalogMigrationSource&lt;/li&gt;
	&lt;li&gt;SessionCatalogMigrationDestination&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Add a test in session_catalog_migration_source_test.cpp to replicate the error where _handleWriteHistory does not ignore oplog entries outside of the appropriate chunk range&lt;/li&gt;
	&lt;li&gt;Add a conditional where it &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0e0bdb41cf80cfa3e151b3aba3a5ebb77714c06e/src/mongo/db/s/session_catalog_migration_source.cpp#L351&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;currently checks the opType&lt;/a&gt; to also check if the opType is kNoop. But make sure to not filter out necessary no-op entries that need to be passed through.&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="1955696">SERVER-62233</key>
            <summary>Make SessionCatalogMigrationSource handleWriteHistory filter out oplogs outside of the chunkRange with OpType &apos;n&apos;</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="13201">Fixed</resolution>
                                        <assignee username="luis.osta@mongodb.com">Luis Osta</assignee>
                                    <reporter username="luis.osta@mongodb.com">Luis Osta</reporter>
                        <labels>
                            <label>sharding-nyc-subteam1</label>
                    </labels>
                <created>Wed, 22 Dec 2021 19:54:12 +0000</created>
                <updated>Sun, 29 Oct 2023 21:44:45 +0000</updated>
                            <resolved>Fri, 14 Jan 2022 01:56:12 +0000</resolved>
                                                    <fixVersion>5.3.0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4292403" author="xgen-internal-githook" created="Fri, 14 Jan 2022 01:55:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Luis Osta&apos;, &apos;email&apos;: &apos;luis.osta@mongodb.com&apos;, &apos;username&apos;: &apos;LuisOsta&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62233&quot; title=&quot;Make SessionCatalogMigrationSource handleWriteHistory filter out oplogs outside of the chunkRange with OpType &amp;#39;n&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62233&quot;&gt;&lt;del&gt;SERVER-62233&lt;/del&gt;&lt;/a&gt; Filter Rewritten No-Op Oplogs Outside Chunk Range In handleWriteHistory&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2b9cd37e1f6c43c79d8ff99f800daea5a3bfb01c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2b9cd37e1f6c43c79d8ff99f800daea5a3bfb01c&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1939369">SERVER-61808</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 6 Jan 2022 17:00:21 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 3 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 3 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>luis.osta@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0fgdb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzynlj:</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="5726">Sharding 2022-01-10</customfieldvalue>
    <customfieldvalue id="5727">Sharding 2022-01-24</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</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|i0f2in:</customfieldvalue>

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