<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:20:58 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-49836] Handle sessions commands during tenant migrations</title>
                <link>https://jira.mongodb.org/browse/SERVER-49836</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The&#160; &lt;a href=&quot;https://docs.mongodb.com/manual/reference/server-sessions/#sessions-commands&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sessions commands&lt;/a&gt; are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;endSessions
	&lt;ul&gt;
		&lt;li&gt;adds the sessions to the mongod&apos;s LogicalSessionCache&apos;s _endingSessions&lt;/li&gt;
		&lt;li&gt;the config.system.sessions docs will be removed the next time the mongod does its periodic LogicalSessionCache refresh&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;kill*Sessions
	&lt;ul&gt;
		&lt;li&gt;aborts the transactions associated with the session&lt;/li&gt;
		&lt;li&gt;closes open cursors associated with the session&lt;/li&gt;
		&lt;li&gt;kills operations associated with the session&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;refreshSessions
	&lt;ul&gt;
		&lt;li&gt;updates the session&apos;s &quot;lastUse&quot; in the mongod&apos;s LogicalSessionCache&lt;/li&gt;
		&lt;li&gt;the config.system.sessions docs will be updated the next time the mongod does its periodic LogicalSessionCache refresh&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;startSession
	&lt;ul&gt;
		&lt;li&gt;generates a UUID for the session&lt;/li&gt;
		&lt;li&gt;adds the session to the mongod&apos;s LogicalSessionCache&lt;/li&gt;
		&lt;li&gt;the config.system.sessions doc will be inserted the next time the mongod does its periodic LogicalSessionCache refresh&lt;/li&gt;
		&lt;li&gt;returns the UUID&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1418335">SERVER-49836</key>
            <summary>Handle sessions commands during tenant migrations</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="backlog-server-sharding">[DO NOT USE] Backlog - Sharding Team</assignee>
                                    <reporter username="cheahuychou.mao@mongodb.com">Cheahuychou Mao</reporter>
                        <labels>
                            <label>pm-1791_milestone-A</label>
                    </labels>
                <created>Thu, 23 Jul 2020 16:50:02 +0000</created>
                <updated>Tue, 6 Dec 2022 02:14:40 +0000</updated>
                            <resolved>Thu, 19 Nov 2020 03:28:06 +0000</resolved>
                                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3497113" author="esha.maharishi@10gen.com" created="Thu, 19 Nov 2020 03:28:06 +0000"  >&lt;p&gt;Thanks! I&apos;m going ahead and closing as Won&apos;t Do, but &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt; feel free to comment if you think differently.&lt;/p&gt;</comment>
                            <comment id="3497093" author="schwerin" created="Thu, 19 Nov 2020 03:01:54 +0000"  >&lt;p&gt;That matches my understanding.&lt;/p&gt;

&lt;p&gt;On Wed, Nov 18, 2020 at 9:53 PM Esha Maharishi (Jira) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;
</comment>
                            <comment id="3497091" author="esha.maharishi@10gen.com" created="Thu, 19 Nov 2020 02:52:23 +0000"  >&lt;p&gt;Only the &lt;b&gt;endSessions&lt;/b&gt; and &lt;b&gt;refreshSessions&lt;/b&gt; commands &lt;a href=&quot;https://docs.google.com/document/d/10heZ18gZQw3x4MFPaTcY1Pwb0XCW7aSsEX5-cSe-nvs/edit#heading=h.d2pgvnubdq8d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;are supported in API Version 1&lt;/a&gt; (startSession and kill*Sessions are &lt;b&gt;not&lt;/b&gt; supported).&lt;/p&gt;

&lt;p&gt;The question is, is it safe for these commands to execute on the donor and return success to the client, even if the tenant has been migrated away?&lt;/p&gt;

&lt;p&gt;First, note that endSessions and refreshSessions are best-effort only: they only update the mongod&apos;s in-memory LogicalSessionCache before returning, and the in-memory LogicalSessionCache is lost on restart.&lt;/p&gt;

&lt;p&gt;However, if we assume no node is restarted:&lt;/p&gt;

&lt;p&gt;endSessions&apos; effect is that the config.system.sessions entries are deleted sooner than their TTL, allowing the corresponding config.transactions state to be reaped sooner as well. If endSessions executes on the donor instead of the recipient and returns success, all that happens is the sessions&apos; state is reaped slightly later than it could be.&lt;/p&gt;


&lt;p&gt;refreshSessions&apos; effect is to bump the TTL date for the config.system.sessions entries, which will keep the corresponding config.transactions state around longer. The risk in refreshSessions executing on the donor instead of the recipient is that the recipient will garbage collect state sooner than the client would expect. As a result, the client may get back IncompleteTransactionHistory when they retry a write or commitTransaction, even though they think they have kept their session alive. For this to occur, the client would have to do a write, then for at least 30 minutes continue using the session without doing more writes, then retry the write. Since this is unlikely and has a relatively harmless effect on the client, we consider it acceptable.&lt;/p&gt;

&lt;p&gt;So, we can close this as Won&apos;t Do and not synchronize sessions commands with tenant migrations.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schwerin&quot; class=&quot;user-hover&quot; rel=&quot;schwerin&quot;&gt;schwerin&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt;, can you confirm this matches your understanding from the 6 week review?&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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25141"><![CDATA[Sharding]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 19 Nov 2020 02:52:23 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 12 weeks 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-1791</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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 12 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-sharding</customfieldvalue>
            <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>cheahuychou.mao@mongodb.com</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxwbwn:</customfieldvalue>

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

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