<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:46:12 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-37511] Logical session reaper and refresh threads should set up sessions collection immediately</title>
                <link>https://jira.mongodb.org/browse/SERVER-37511</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The logical session cache reaper thread will initially &lt;a href=&quot;https://github.com/mongodb/mongo/blob/82a07e2f04f47de1602885ba00ecbca0ee72fc3f/src/mongo/db/logical_session_cache_impl.cpp#L222&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;set up the sessions collection&lt;/a&gt;. As a part of this, it runs createIndexes which takes a database exclusive lock. Currently, if it runs &lt;a href=&quot;https://github.com/mongodb/mongo/blob/82a07e2f04f47de1602885ba00ecbca0ee72fc3f/src/mongo/db/sessions_collection_rs.cpp#L57-L61&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;before the replication system has been set up&lt;/a&gt; (and its config initialized), it will wait an entire refresh interval before setting up the collection. This can cause the setup to occur at some later point while the database is up and running, and has the potential to cause transaction aborts due to lock timeouts. &lt;/p&gt;</description>
                <environment></environment>
        <key id="615394">SERVER-37511</key>
            <summary>Logical session reaper and refresh threads should set up sessions collection immediately</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="blake.oler@mongodb.com">Blake Oler</assignee>
                                    <reporter username="william.schultz@mongodb.com">William Schultz</reporter>
                        <labels>
                            <label>sharding-wfbf-day</label>
                    </labels>
                <created>Mon, 8 Oct 2018 14:49:15 +0000</created>
                <updated>Sun, 29 Oct 2023 22:27:34 +0000</updated>
                            <resolved>Tue, 23 Oct 2018 15:15:09 +0000</resolved>
                                                    <fixVersion>3.6.10</fixVersion>
                    <fixVersion>4.0.5</fixVersion>
                    <fixVersion>4.1.5</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2101438" author="xgen-internal-githook" created="Fri, 28 Dec 2018 05:39:14 +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-37511&quot; title=&quot;Logical session reaper and refresh threads should set up sessions collection immediately&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37511&quot;&gt;&lt;del&gt;SERVER-37511&lt;/del&gt;&lt;/a&gt; Ensure sessions collection is created in replica set fixture&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 6c5d1761688ea0c8e13fe62afb3574b5326ae9e6)&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/309a5706ad18c1026cdf4e8b2ae2c4c7b00a4868&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/309a5706ad18c1026cdf4e8b2ae2c4c7b00a4868&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2084056" author="xgen-internal-githook" created="Fri, 7 Dec 2018 17:02:37 +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-37511&quot; title=&quot;Logical session reaper and refresh threads should set up sessions collection immediately&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37511&quot;&gt;&lt;del&gt;SERVER-37511&lt;/del&gt;&lt;/a&gt; Ensure sessions collection is created in replica set fixture&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 6c5d1761688ea0c8e13fe62afb3574b5326ae9e6)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4aecec9cc78209b12ba12bdec9a22fa3daad1777&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4aecec9cc78209b12ba12bdec9a22fa3daad1777&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2039158" author="xgen-internal-githook" created="Tue, 23 Oct 2018 15:14:18 +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-37511&quot; title=&quot;Logical session reaper and refresh threads should set up sessions collection immediately&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37511&quot;&gt;&lt;del&gt;SERVER-37511&lt;/del&gt;&lt;/a&gt; Ensure sessions collection is created in replica set fixture&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/6c5d1761688ea0c8e13fe62afb3574b5326ae9e6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/6c5d1761688ea0c8e13fe62afb3574b5326ae9e6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2036425" author="misha.tyulenev" created="Fri, 19 Oct 2018 20:02:34 +0000"  >&lt;p&gt;As discussed offline the fix will be done in the replication test to wait for config.system.sessions collection to be created before starting the test.&lt;/p&gt;</comment>
                            <comment id="2026826" author="misha.tyulenev" created="Mon, 8 Oct 2018 17:27:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=william.schultz&quot; class=&quot;user-hover&quot; rel=&quot;william.schultz&quot;&gt;william.schultz&lt;/a&gt; &quot; My understanding is that the config.system.sessions collection only needs to be created once, and from then on it is only necessary to do document level operations on the collection to maintain its correct state.&quot; is not correct.&lt;br/&gt;
It should be possible to build config.system.sessions collection at any time - we have help tickets e.g.  &lt;a href=&quot;https://jira.mongodb.org/browse/HELP-7707?focusedCommentId=2018462&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-2018462&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/HELP-7707?focusedCommentId=2018462&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-2018462&lt;/a&gt;&lt;br/&gt;
that provide advice to customers to use the auto-healing property of the sessions collection. &lt;br/&gt;
This is due to the bugs in the original implementation.&lt;/p&gt;</comment>
                            <comment id="2026815" author="william.schultz" created="Mon, 8 Oct 2018 17:20:26 +0000"  >&lt;p&gt;As an additional note, there &lt;em&gt;was&lt;/em&gt; previously an issue with the reaper thread periodically aborting running transactions, due to the strength of locks acquired when running the &lt;tt&gt;createIndexes&lt;/tt&gt; command. &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; pointed out that this should be fixed now, in 4.0 and 4.2 by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36961&quot; title=&quot;createIndexes command should check if index already exists with weak lock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36961&quot;&gt;&lt;del&gt;SERVER-36961&lt;/del&gt;&lt;/a&gt; i.e. now the reaper only acquires strong locks during its &lt;em&gt;initial&lt;/em&gt; run.&lt;/p&gt;</comment>
                            <comment id="2026810" author="william.schultz" created="Mon, 8 Oct 2018 17:16:34 +0000"  >&lt;p&gt;There is nothing testing specific about the root issue described here. The issue happens to cause spurious failures in our tests that expect transactions to run and commit successfully. If a transaction encounters a failure due to a lock timeout, then it fails the test. In a real system, I am less sure whether we would consider this a significant &quot;bug&quot;. It is already the case that running DDL operations of any kind increases the possibility of lock conflicts with concurrent transactions. That is a fundamental aspect of the system that is known, and is not considered a bug. It seems that the worst that would happen here is that a user that is running transactions encounters a bunch of lock conflicts when the reaper thread chooses to run for the first time. Every subsequent run of the reaper thread, though, shouldn&apos;t produce any issues. My understanding is that the &lt;tt&gt;config.system.sessions&lt;/tt&gt; collection only needs to be created once, and from then on it is only necessary to do document level operations on the collection to maintain its correct state. It seems sensible that the reaper thread would be forced to create the collection and indexes at startup, instead of waiting a refresh interval, but I don&apos;t think it&apos;s necessarily a serious problem. I&apos;ll leave that decision up to &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; and &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; since you have been working on this recently.&lt;/p&gt;

&lt;p&gt;To be clear, I do not think that blacklisting our transactions tests is the way to fix the test failures. We should want coverage of the interaction between the logical session reaper and transactions.&lt;/p&gt;</comment>
                            <comment id="2026653" author="misha.tyulenev" created="Mon, 8 Oct 2018 15:33:56 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=william.schultz&quot; class=&quot;user-hover&quot; rel=&quot;william.schultz&quot;&gt;william.schultz&lt;/a&gt; please clarify if this scenario occurs during testing only? &lt;/p&gt;</comment>
                            <comment id="2026578" author="william.schultz" created="Mon, 8 Oct 2018 14:51:15 +0000"  >&lt;p&gt;This has shown up as an issue in our test infrastructure, but may also be a general issue worth fixing.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="597268">SERVER-36921</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.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>Mon, 8 Oct 2018 15:33:56 +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_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_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>18.0</customfieldvalue>

                        </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>blake.oler@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>misha.tyulenev@mongodb.com</customfieldvalue>
            <customfieldvalue>william.schultz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu9qwn:</customfieldvalue>

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

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