<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:51:27 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-61067] Add test that afterClusterTime find against mongos returns TenantMigrationCommitted</title>
                <link>https://jira.mongodb.org/browse/SERVER-61067</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Once a tenant migration has committed, the donor will &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a8408f0d115740981f9ed9ec10ca20aa58776902/src/mongo/db/repl/tenant_migration_donor_access_blocker.cpp#L173L184&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;reject reads with a readTimestamp later than the blockTimestamp&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This ticket is to add a test that the TenantMigrationCommitted error is currently passed back from the donor through mongos/mongoq to the client. (In a later ticket, we&apos;ll update mongos/mongoq to handle TenantMigrationCommitted internally by retrying against the recipient.)&lt;/p&gt;

&lt;p&gt;In order to generate a read with a readTimestamp later than the blockTimestamp, we can do the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Start a ShardingTest with two mongos and with the noop writer turned off on the shards&lt;/li&gt;
	&lt;li&gt;Use enableSharding to create a database&lt;/li&gt;
	&lt;li&gt;Use movePrimary to ensure the database&apos;s primary shard is the first shard&lt;/li&gt;
	&lt;li&gt;Start a causally consistent session&lt;/li&gt;
	&lt;li&gt;Run a find through the first mongos to make the first mongos load the database entry into its cache&lt;/li&gt;
	&lt;li&gt;Run a tenant migration and wait for it to commit&lt;/li&gt;
	&lt;li&gt;Manually update the routing table on the config server to say the database lives on the recipient shard&lt;/li&gt;
	&lt;li&gt;Run a write through the second mongos to make the second mongos load the updated database entry into its cache and generate a clusterTime higher than that on the first shard&lt;/li&gt;
	&lt;li&gt;Run a read through the first mongos, which will attach afterClusterTime of the clusterTime of the write since it&apos;s in a causally consistent session. The first mongos should still target the donor since it has the old database entry cached. The donor should return TenantMigrationCommitted. Assert that the first mongos passes this error back to the client.&lt;br/&gt;
 &#160;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1912108">SERVER-61067</key>
            <summary>Add test that afterClusterTime find against mongos returns TenantMigrationCommitted</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="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="12300">Won&apos;t Do</resolution>
                                        <assignee username="sophia.tan@mongodb.com">Sophia Tan</assignee>
                                    <reporter username="esha.maharishi@mongodb.com">Esha Maharishi</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Oct 2021 12:56:26 +0000</created>
                <updated>Mon, 1 Nov 2021 22:22:08 +0000</updated>
                            <resolved>Mon, 1 Nov 2021 22:22:08 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="4162010" author="esha.maharishi@10gen.com" created="Mon, 1 Nov 2021 22:22:08 +0000"  >&lt;p&gt;This test would have been unnecessarily complex, since the find command will return TenantMigrationCommitted if sent after the migration has committed even if the find command does not have afterClusterTime.&lt;/p&gt;

&lt;p&gt;We have a similar test for the count command &lt;a href=&quot;https://github.com/mongodb/mongo/blob/8d6668dd678ca61668d41ceb3d0082290b429562/jstests/serverless/read_write_post_migration.js#L69-L70&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are refactoring TenantMigrationDonorAccessBlocker::getCanReadFuture to improve its clarity under &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61114&quot; title=&quot;Refactor TenantMigrationDonorAccessBlocker::getCanReadFuture to make it easier to understand&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61114&quot;&gt;&lt;del&gt;SERVER-61114&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                    <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_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 14 weeks, 2 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-2477</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>esha.maharishi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 14 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>sophia.tan@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i082tb:</customfieldvalue>

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

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