<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:46:33 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-37631] Disable logical sessions if FCV is 3.4</title>
                <link>https://jira.mongodb.org/browse/SERVER-37631</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The following scenario causes the server to stop accepting sessions.&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;the driver creates logical sessions implicitly assuming the server supports it. Per offline chat with &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; the driver implicitly starts a session on the server iff the isMaster has a logicalSessionTimeoutMinutes  set (&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst&lt;/a&gt;) and mongos 3.6 unconditionally returns that value in &lt;tt&gt;isMaster&lt;/tt&gt; because it has no concept of FCV&lt;/li&gt;
	&lt;li&gt;the mongos passes the command to mongod&lt;/li&gt;
	&lt;li&gt;mongod creates the session in the cache but fails to add it to a collection because it does not have the config.systme.sessions collection with FCV 3.4&lt;/li&gt;
	&lt;li&gt;without config.sessions.collection sessions are not expired and eventually hit the max of the activeSessionsCount =  1,000,000&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name=&quot;SuggestedFix&quot;&gt;&lt;/a&gt;Suggested Fix&lt;/h3&gt;
&lt;p&gt;The gist of the fix is mongos should  rely on sessions collection existence on the config server to return the logicalSessionTimeoutMinutes in isMaster and handling explicit sessions operations.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;every refreshSessions SessionsCollection needs to detect if the sessions collection exists and set the corresponding member&lt;/li&gt;
	&lt;li&gt;add a method to LogicalSessionsCache::hasSessionsTable that retruns SessionsCollection::hasSessionsTable&lt;/li&gt;
	&lt;li&gt;run LogicalSessionsCache::refreshNow on startup&lt;/li&gt;
	&lt;li&gt;add logicalSessionTimeoutMinutes to isMaster if (FCV ==3.6) &amp;amp;&amp;amp; LogicalSessionsCache::hasSessionsTable()&lt;/li&gt;
	&lt;li&gt;reject explicit sessions operations if !LogicalSessionsCache::hasSessionsTable()&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name=&quot;FCVupdate3.6to3.4&quot;&gt;&lt;/a&gt;FCV update 3.6 to 3.4 &lt;/h3&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;please read &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; for guidelines&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="618489">SERVER-37631</key>
            <summary>Disable logical sessions if FCV is 3.4</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="misha.tyulenev@mongodb.com">Misha Tyulenev</assignee>
                                    <reporter username="misha.tyulenev@mongodb.com">Misha Tyulenev</reporter>
                        <labels>
                            <label>SWCW</label>
                    </labels>
                <created>Mon, 15 Oct 2018 16:24:55 +0000</created>
                <updated>Mon, 8 Jan 2024 15:22:58 +0000</updated>
                            <resolved>Thu, 1 Nov 2018 15:10:14 +0000</resolved>
                                    <version>3.6.8</version>
                                    <fixVersion>3.6.9</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="2185166" author="xgen-internal-githook" created="Tue, 19 Mar 2019 18:07:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;mbroadst@gmail.com&apos;, &apos;name&apos;: &apos;Matt Broadstone&apos;, &apos;username&apos;: &apos;mbroadst&apos;}
&lt;p&gt;Message: test: fix sessions tests on 3.6 sharded clusters&lt;/p&gt;

&lt;p&gt;&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; requires that 3.6 servers have a command run on them&lt;br/&gt;
to report `logicalSessionsTimeoutMinutes` on connected proxies.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/node-mongodb-native/commit/7d4c88adc22a3b5c212f47870b8a8783b12997c1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/node-mongodb-native/commit/7d4c88adc22a3b5c212f47870b8a8783b12997c1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2185159" author="xgen-internal-githook" created="Tue, 19 Mar 2019 18:02:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;mbroadst@gmail.com&apos;, &apos;name&apos;: &apos;Matt Broadstone&apos;, &apos;username&apos;: &apos;mbroadst&apos;}
&lt;p&gt;Message: test: fix sessions tests on 3.6 sharded clusters&lt;/p&gt;

&lt;p&gt;&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; requires that 3.6 servers have a command run on them&lt;br/&gt;
to report `logicalSessionsTimeoutMinutes` on connected proxies.&lt;br/&gt;
Branch: fix-sharded-36-tests&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/node-mongodb-native/commit/311c3fabc18a152e58810ba4ca4eeb0822dbd793&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/node-mongodb-native/commit/311c3fabc18a152e58810ba4ca4eeb0822dbd793&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2184431" author="matt.broadstone" created="Mon, 18 Mar 2019 22:03:34 +0000"  >&lt;p&gt;I&apos;m also seeing the same behavior when running integration tests for the node driver, is there any plan to correct this in future versions? &lt;/p&gt;</comment>
                            <comment id="2142962" author="shane.harvey" created="Fri, 8 Feb 2019 20:19:06 +0000"  >&lt;p&gt;When starting 3.6.9/3.6.10 sharded clusters I had to make &lt;a href=&quot;https://github.com/10gen/mongo-orchestration/pull/265&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;a change to mongo-orchestration&lt;/a&gt; to run the &lt;tt&gt;refreshLogicalSessionCacheNow&lt;/tt&gt; command on the config server and again on each mongos in order for the mongoses to correctly report logicalSessionTimeoutMinutes in their isMaster responses.&lt;/p&gt;

&lt;p&gt;Without running &lt;tt&gt;refreshLogicalSessionCacheNow&lt;/tt&gt; in this way, the mongoses only start reporting logicalSessionTimeoutMinutes 5 minutes after adding the shard. Is this working as designed? Why does is take 5 minutes for the cluster to decide it supports sessions?&lt;/p&gt;</comment>
                            <comment id="2048955" author="xgen-internal-githook" created="Thu, 1 Nov 2018 15:08:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Misha Tyulenev&apos;, &apos;email&apos;: &apos;misha@mongodb.com&apos;, &apos;username&apos;: &apos;mikety&apos;}
&lt;p&gt;Message: &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;: disable logical sessions if FCV is 3.4&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/0d8a9736bc458eb8b523ed5c50c63c4ddb1e6b4e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/0d8a9736bc458eb8b523ed5c50c63c4ddb1e6b4e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2038162" author="misha.tyulenev" created="Mon, 22 Oct 2018 20:19:31 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&lt;/a&gt; thanks for the feedback:&lt;br/&gt;
1. Yes its mongos logic&lt;br/&gt;
2. If the sessions table disappears it&apos;s an unspecified behavior - there is no code in mongodb deleting config.system.sessions collection. It will not be disruptive for the existing connections.&lt;br/&gt;
3. mongos waits for ShardRegistry and signing keys, Ill add the code to the initMongosServer.&lt;br/&gt;
4. I think mongos uses binary version for FCV, so its always 3.6. Mongod does not need an extra logic to handle the FCV settings.&lt;/p&gt;</comment>
                            <comment id="2035000" author="kaloian.manassiev" created="Thu, 18 Oct 2018 09:23:57 +0000"  >&lt;p&gt;The approach sounds good, but I want to ask just a couple of clarifications.&lt;/p&gt;

&lt;p&gt;The logic that you are describing will only run on MongoS, right?&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;run LogicalSessionsCache::refreshNow on startup&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This will run before MongoS starts accepting connections, right? Otherwise at MongoS restart, a driver which happened to work might suddenly stop and/or have undesired side effects. If for some reason &lt;tt&gt;refreshNow&lt;/tt&gt; fails we will not fail startup, right - just continue trying?&lt;/p&gt;

&lt;p&gt;Also, do we have precedent before that where we do reads from MongoS before opening the connections - maybe the ShardRegistry? Just asking because that would increase the MongoS startup time, but I think it is fine to do that. Just something to keep in mind with the overall push towards &quot;less impactful restarts/upgrades&quot;.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;add logicalSessionTimeoutMinutes to isMaster if (FCV ==3.6) &amp;amp;&amp;amp; LogicalSessionsCache::hasSessionsTable()&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;MongoS doesn&apos;t have any concept of FCV. Do you mean that this would be the logic on the MongoD side? Because MongoD already has the first condition.&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="508062">SERVER-33763</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="571042">SERVER-36104</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1805878">MONGOID-5113</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </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_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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000cF9rDIAS, 5002K00000cyHc4QAE, 5002K00000iMxxoQAC]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 18 Oct 2018 09:23:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 47 weeks, 1 day 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-33763'>SERVER-33763</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-36104'>SERVER-36104</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>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>
                            4 years, 47 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.broadstone@mongodb.com</customfieldvalue>
            <customfieldvalue>misha.tyulenev@mongodb.com</customfieldvalue>
            <customfieldvalue>shane.harvey@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hua9mf:</customfieldvalue>

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

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