<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:45:26 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-37241] Add testing to verify proper expiration of sessions in the sessions collection</title>
                <link>https://jira.mongodb.org/browse/SERVER-37241</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;A lack of testing exists around verifying that sessions do indeed expire from the sessions collection when their lifetime is up.&lt;/p&gt;

&lt;p&gt;The session expiry time is a server parameter, measured in minutes. We may want to consider increasing the granularity to seconds so we don&apos;t make tests wait an abnormal amount of time. &lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;ProposedFix&quot;&gt;&lt;/a&gt;Proposed Fix&lt;/h2&gt;
&lt;ol&gt;
	&lt;li&gt;Change the granularity of the logical session timeout to seconds instead of minutes. Since the drivers rely on the parameter &quot;localLogicalSessionTimeoutMinutes&quot; to exist in calls to isMaster(), I can take the following approaches:
	&lt;ol&gt;
		&lt;li&gt;Create a duplicate parameter &quot;logicalSessionTimeoutSeconds&quot; which will be in the granularity of seconds... I&apos;m not sure how this would work, and what precedent exists for duplicating parameters.&lt;/li&gt;
		&lt;li&gt;Set the timeout to X seconds internally if test commands are enabled. I don&apos;t think this would play nicely with tests, but I haven&apos;t verified.&lt;/li&gt;
		&lt;li&gt;Talk to drivers for a possible downstream change to &quot;logicalSessionTimeoutSeconds&quot; completely.&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
	&lt;li&gt;Add a test case that  will run  &quot;find, wait for TTL*0.5,  getMore, wait for TTL*0.5, getMore, wait for TTL*0.5, getMore, close cursor, verify the session exists&quot; i.e. verify that the cursors remain open and the session is not expired.&lt;/li&gt;
	&lt;li&gt;Once the workload is over wait for the TTL *1.5 and check that there are no sessions in the collection&lt;/li&gt;
	&lt;li&gt;No need to manually invoke any refresh commands, the getMore execution guarantees that sessions are there.&lt;/li&gt;
&lt;/ol&gt;



</description>
                <environment></environment>
        <key id="607900">SERVER-37241</key>
            <summary>Add testing to verify proper expiration of sessions in the sessions collection</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="13201">Fixed</resolution>
                                        <assignee username="blake.oler@mongodb.com">Blake Oler</assignee>
                                    <reporter username="blake.oler@mongodb.com">Blake Oler</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Sep 2018 02:46:51 +0000</created>
                <updated>Sun, 29 Oct 2023 22:28:01 +0000</updated>
                            <resolved>Wed, 31 Oct 2018 17:01:21 +0000</resolved>
                                                    <fixVersion>3.6.10</fixVersion>
                    <fixVersion>4.0.6</fixVersion>
                    <fixVersion>4.1.5</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2101436" author="xgen-internal-githook" created="Fri, 28 Dec 2018 05:33:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;BlakeIsBlake&apos;, &apos;email&apos;: &apos;blake.oler@mongodb.com&apos;, &apos;name&apos;: &apos;Blake Oler&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37241&quot; title=&quot;Add testing to verify proper expiration of sessions in the sessions collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37241&quot;&gt;&lt;del&gt;SERVER-37241&lt;/del&gt;&lt;/a&gt; Add testing to verify proper expiration of sessions in the sessions collection&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 3caa3c4a4be7b84823f22f481365f58b124d6d00)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/49210e8f6bec46b416113f7b93784d7fff655f19&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/49210e8f6bec46b416113f7b93784d7fff655f19&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2100492" author="xgen-internal-githook" created="Wed, 26 Dec 2018 20:57:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;BlakeIsBlake&apos;, &apos;email&apos;: &apos;blake.oler@mongodb.com&apos;, &apos;name&apos;: &apos;Blake Oler&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37241&quot; title=&quot;Add testing to verify proper expiration of sessions in the sessions collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37241&quot;&gt;&lt;del&gt;SERVER-37241&lt;/del&gt;&lt;/a&gt; Add testing to verify proper expiration of sessions in the sessions collection&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 3caa3c4a4be7b84823f22f481365f58b124d6d00)&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2760fd38a929ae790c6fbb7ffbb7ed94b387fc61&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2760fd38a929ae790c6fbb7ffbb7ed94b387fc61&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2047657" author="xgen-internal-githook" created="Wed, 31 Oct 2018 16:38:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Blake Oler&apos;, &apos;email&apos;: &apos;blake.oler@mongodb.com&apos;, &apos;username&apos;: &apos;BlakeIsBlake&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37241&quot; title=&quot;Add testing to verify proper expiration of sessions in the sessions collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37241&quot;&gt;&lt;del&gt;SERVER-37241&lt;/del&gt;&lt;/a&gt; Add testing to verify proper expiration of sessions in the sessions collection&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3caa3c4a4be7b84823f22f481365f58b124d6d00&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3caa3c4a4be7b84823f22f481365f58b124d6d00&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2045405" author="misha.tyulenev" created="Mon, 29 Oct 2018 19:25:49 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=blake.oler&quot; class=&quot;user-hover&quot; rel=&quot;blake.oler&quot;&gt;blake.oler&lt;/a&gt; i see 2 distinct phases in the refresh:&lt;br/&gt;
1. update lastUsed field - to enable session expiring. The test must validate that the update computes the documents that need to be updated.&lt;br/&gt;
2. find the  set difference between sessions collection and the open cursors and close &quot;exipred&quot; cursors&lt;br/&gt;
Im ok with the changes as long as the test should verify those work.&lt;/p&gt;</comment>
                            <comment id="2045397" author="blake.oler" created="Mon, 29 Oct 2018 19:19:11 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=misha.tyulenev&quot; class=&quot;user-hover&quot; rel=&quot;misha.tyulenev&quot;&gt;misha.tyulenev&lt;/a&gt; I think the new approach might actually be simpler... when working with the sessions collection in isolation, we can dictate exactly what we want the TTL behavior to be. Since expiration from a TTL index can be modeled as a deletion, we can just blanket delete necessary documents to simulate expiration.&lt;/p&gt;

&lt;p&gt;At any given time, the logical session cache&apos;s refresh is relying upon the existence (or non-existence) of documents in the sessions collection. The logical session cache by design can&apos;t distinguish between a manual deletion and expiration. It assumes that if a document no longer exists in the collection, it has expired. It wouldn&apos;t need to know the difference between expiration and deletion, anyway &amp;#8211; manual deletion of sessions records on-disk is undefined behavior to an end user.&lt;/p&gt;

&lt;p&gt;We&apos;re taking advantage of the lack of distinction between deletion and expiration much to our advantage. I foresee this approach being many fewer lines of code than the previous approach, with the added benefit of forgoing the need for server code or parameter changes.&lt;/p&gt;</comment>
                            <comment id="2045373" author="misha.tyulenev" created="Mon, 29 Oct 2018 19:06:53 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=blake.oler&quot; class=&quot;user-hover&quot; rel=&quot;blake.oler&quot;&gt;blake.oler&lt;/a&gt; I agree with the new plan. It&apos;s a bit more elaborate than the original because the test must now reimplement part of the TTL index functionality - namely check and remove documents that are &quot;expired&quot; in order to get the logical sessions refresh work as designed.&lt;br/&gt;
I think its worth the effort as it gives us more stable tests that will not depend on a TTL thread scheduling&lt;/p&gt;</comment>
                            <comment id="2045363" author="misha.tyulenev" created="Mon, 29 Oct 2018 19:01:25 +0000"  >&lt;p&gt;Thank you &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt; yes looks like this is what&apos;s needed.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15640"><![CDATA[v4.0]]></customfieldvalue>
    <customfieldvalue key="15141"><![CDATA[v3.6]]></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>Wed, 26 Sep 2018 20:50:09 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 6 weeks, 5 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-1237</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>
                            5 years, 6 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>blake.oler@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>misha.tyulenev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu8j2v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htx9m7:</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="2539">Sharding 2018-10-22</customfieldvalue>
    <customfieldvalue id="2540">Sharding 2018-11-05</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|hu85c7:</customfieldvalue>

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