<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:42:03 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-36104] LogicalSessions should destroy cache on setting FCV from 3.6 to 3.4 </title>
                <link>https://jira.mongodb.org/browse/SERVER-36104</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, sessions do not fully support upgrade/downgrade. In particular, the LogicalSessionsCache does not handle the scenario with FCV 3.6 downgrade to FCV 3.4. &lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;SuggestedFix&quot;&gt;&lt;/a&gt;Suggested Fix&lt;/h3&gt;
&lt;ol&gt;
	&lt;li&gt;When mongod detects that FCV is set to 3.4 in 3.6 binary it will delete the sessions collection&lt;/li&gt;
	&lt;li&gt;mongod will be closing all sessions except the sessions that have active operations&lt;/li&gt;
	&lt;li&gt;mongos will be able to find out that the sessions collection does not exist and also will be closing all sessions that are in cache but not the part of the active operation&lt;/li&gt;
	&lt;li&gt;mongod and mongos will keep accepting new sessions to mitigate the potential problem when drivers will not discover that server does not support sessions any more via checking logicalSessionsTimeoutMinutes&lt;/li&gt;
	&lt;li&gt;stop setting logicalSessionsTimeoutMinutes in the isMaster response&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;&lt;a name=&quot;Workaround&quot;&gt;&lt;/a&gt;Workaround&lt;/h3&gt;
&lt;p&gt;In the case FCV is set to 3.4 to 3.6 the sessions collection will exist and on a sharded cluster mongos will not be able to detect that it should stop sending the logicalSessionsTimeoutMinues field in the isMaster response. Hence drivers per the spec will keep creating sessions implicitly and it may lead to exceeding the maximum 1000,000 sessions limit.&lt;br/&gt;
To avoid it a user can consider manually deleting the config.systems.sessions collection in this scenario. Then mongos with the fix for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37631&quot; title=&quot;Disable logical sessions if FCV is 3.4&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37631&quot;&gt;&lt;del&gt;SERVER-37631&lt;/del&gt;&lt;/a&gt; will be able to detect the FCV change and will stop sending logicalSessionsTimeoutMinutes field.&lt;/p&gt;

&lt;p&gt;Its critically important to be sure that the refresh thread that updates logical sessions cache is not running on the config server when dropping the config.systems.sessions collection as it may cause a config server crash per &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36904&quot; title=&quot;Fuzzer drops config.system.sessions and triggers invariant&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36904&quot;&gt;&lt;del&gt;SERVER-36904&lt;/del&gt;&lt;/a&gt; &lt;/p&gt;</description>
                <environment></environment>
        <key id="571042">SERVER-36104</key>
            <summary>LogicalSessions should destroy cache on setting FCV from 3.6 to 3.4 </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="2">Won&apos;t Fix</resolution>
                                        <assignee username="misha.tyulenev@mongodb.com">Misha Tyulenev</assignee>
                                    <reporter username="misha.tyulenev@mongodb.com">Misha Tyulenev</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Jul 2018 22:01:49 +0000</created>
                <updated>Fri, 2 Nov 2018 15:53:15 +0000</updated>
                            <resolved>Thu, 1 Nov 2018 15:28:52 +0000</resolved>
                                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2049003" author="misha.tyulenev" created="Thu, 1 Nov 2018 15:28:52 +0000"  >&lt;p&gt;The workaround is added to the description, THe issue will affect only sharded clusters with FCV change 3.6-&amp;gt;3.4&lt;/p&gt;</comment>
                            <comment id="2048989" author="misha.tyulenev" created="Thu, 1 Nov 2018 15:23:46 +0000"  >&lt;p&gt;Not fixing this issue in 3.6 as it can be too risky to drop the collection and kill the sessions.&lt;br/&gt;
The fix for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37631&quot; title=&quot;Disable logical sessions if FCV is 3.4&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37631&quot;&gt;&lt;del&gt;SERVER-37631&lt;/del&gt;&lt;/a&gt; will enable a workaround outlined in the description&lt;/p&gt;</comment>
                            <comment id="2040948" author="behackett" created="Wed, 24 Oct 2018 19:22:40 +0000"  >&lt;p&gt;This sounds reasonable to me. Not returning logicalSessionsTimeoutMinutes in ismaster is the key thing for drivers.&lt;/p&gt;</comment>
                            <comment id="2040654" author="misha.tyulenev" created="Wed, 24 Oct 2018 16:28:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=behackett&quot; class=&quot;user-hover&quot; rel=&quot;behackett&quot;&gt;behackett&lt;/a&gt; Please confirm that this behavior will be correct&lt;br/&gt;
Please let me know what tests are there to make sure that drivers are able to handle setFVC 3.4 correctly&lt;/p&gt;</comment>
                            <comment id="2019003" author="misha.tyulenev" created="Mon, 1 Oct 2018 13:52:04 +0000"  >&lt;p&gt;&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; I suggest making the change in the 3.6 branch only&lt;/p&gt;</comment>
                            <comment id="2018639" author="max.hirschhorn@10gen.com" created="Sun, 30 Sep 2018 19:27:39 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Greg McKeon updated&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36104&quot; title=&quot;LogicalSessions should destroy cache on setting FCV from 3.6 to 3.4 &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36104&quot;&gt;&lt;del&gt;SERVER-36104&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
---------------------------------&lt;br/&gt;
&#160; &#160; Fix Version/s: 4.1 Required&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(was: Needs Triage)&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=greg.mckeon&quot; class=&quot;user-hover&quot; rel=&quot;greg.mckeon&quot;&gt;greg.mckeon&lt;/a&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;, given the &quot;LogicalSessions should destroy cache on setting FCV from 3.6 to 3.4 &quot; title of this ticket and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.6.8/src/mongo/db/logical_session_cache_impl.cpp#L276-L279&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the &quot;TODO SERVER-36104&quot; comment that exists only on the 3.6 branch&lt;/a&gt;, could you please clarify whether this ticket represents (a) a change to the master branch for how we&apos;ll handle the session catalog and featureCompatibilityVersion downgrades going forward - subsequently backporting to the 3.6 branch, or (b) a change only to the 3.6 branch?&lt;/p&gt;</comment>
                            <comment id="1952810" author="esha.maharishi@10gen.com" created="Fri, 20 Jul 2018 21:29:59 +0000"  >&lt;p&gt;Ok, putting back into Needs Triage.&lt;/p&gt;</comment>
                            <comment id="1952796" author="misha.tyulenev" created="Fri, 20 Jul 2018 21:14:32 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.maharishi&quot; class=&quot;user-hover&quot; rel=&quot;esha.maharishi&quot;&gt;esha.maharishi&lt;/a&gt; its a nice to have feature, I have recently committed code that ignores sessions if FCV is not 3.6  - &lt;a href=&quot;https://github.com/mongodb/mongo/commit/646d68003cadcd60fed5abaf1e92368390a4a1cb#diff-4564c6051c66e89d319ed96f26eaa7e1R276&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/646d68003cadcd60fed5abaf1e92368390a4a1cb#diff-4564c6051c66e89d319ed96f26eaa7e1R276&lt;/a&gt;&lt;br/&gt;
but the correct fix would be removing sessions from the cache on downgrade, otherwise FCV 3.6 - 3.4 -3.6 change retains active sessions which is not desirable.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="595900">SERVER-36904</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="618489">SERVER-37631</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="508062">SERVER-33763</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="563996">SERVER-35795</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>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 20 Jul 2018 15:19:06 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 14 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-36904'>SERVER-36904</a></s>]]></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>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>misha.tyulenev@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 14 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>bernie@mongodb.com</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</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|hu2k0f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htuntj:</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="2482">Sharding 2018-09-24</customfieldvalue>
    <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|hu269r:</customfieldvalue>

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