<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:18:55 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-28737] Have ephemeralForTest use std::mutex for protecting its internal data structures</title>
                <link>https://jira.mongodb.org/browse/SERVER-28737</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The LockManager was used for ephemeralForTest reader/writer locks, but the LockManager has a limitation on the number of locks that can be taken by one thread at a time. Exceeding that limit now causes an exception to be thrown. Exceptions cannot safely escape catch blocks. `rollback` methods are called from within catch blocks and thus in no circumstances can throw. By implication, rollback methods cannot acquire locks managed by the LockManager.&lt;/p&gt;

&lt;p&gt;The simple fix here is to replace the RW lock with a std&lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt;::mutex. This will prevent concurrent readers when using ephemeralForTest. However, because the critical section is fast and using a std::mutex is likely to be faster than managing RW locks, there may be no performance loss at all.&lt;/p&gt;</description>
                <environment></environment>
        <key id="373022">SERVER-28737</key>
            <summary>Have ephemeralForTest use std::mutex for protecting its internal data structures</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="9">Done</resolution>
                                        <assignee username="daniel.gottlieb@mongodb.com">Daniel Gottlieb</assignee>
                                    <reporter username="daniel.gottlieb@mongodb.com">Daniel Gottlieb</reporter>
                        <labels>
                            <label>bkp</label>
                    </labels>
                <created>Tue, 11 Apr 2017 17:40:08 +0000</created>
                <updated>Wed, 6 Dec 2017 21:12:16 +0000</updated>
                            <resolved>Tue, 25 Apr 2017 13:57:46 +0000</resolved>
                                                    <fixVersion>3.4.7</fixVersion>
                    <fixVersion>3.5.7</fixVersion>
                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1613973" author="xgen-internal-githook" created="Wed, 5 Jul 2017 13:41:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dgottlieb&apos;, u&apos;name&apos;: u&apos;Daniel Gottlieb&apos;, u&apos;email&apos;: u&apos;daniel.gottlieb@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27831&quot; title=&quot;Deadlock when listing collections on &amp;quot;local&amp;quot; database with replication enabled for KVCatalog-based storage engines without document locking&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27831&quot;&gt;&lt;del&gt;SERVER-27831&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28737&quot; title=&quot;Have ephemeralForTest use std::mutex for protecting its internal data structures&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28737&quot;&gt;&lt;del&gt;SERVER-28737&lt;/del&gt;&lt;/a&gt;: Push threadsafety responsibility inside of KVCatalog&apos;s RecordStore&lt;/p&gt;

&lt;p&gt;RecordStores that don&apos;t implement document level locking are typically&lt;br/&gt;
protected from concurrent reads and writes. However one exception is the&lt;br/&gt;
RecordStore passed into KVCatalog. Previously, if&lt;br/&gt;
StorageEngine::supportsDocLocking was false, the KVCatalog would use&lt;br/&gt;
an additional lock that participated in two phase locking to ensure&lt;br/&gt;
reader-writer protection to the underlying record store (and more&lt;br/&gt;
specifically, delay releasing until any potential rollbacks were&lt;br/&gt;
processed). However, access to the catalog can happen anywhere and this&lt;br/&gt;
lock did not have a formally assigned acquisition time relative to other&lt;br/&gt;
locks resulting in potential deadlocks.&lt;/p&gt;

&lt;p&gt;This patch forces the thread-safety requirement into the RecordStore.&lt;br/&gt;
Specifically, EphemeralForTest was changed to acquire a finer grained&lt;br/&gt;
mutex (i.e: does not participate in two-phase locking) to protect its&lt;br/&gt;
internal state. Now that the lock exists inside EphemeralForTest, it is&lt;br/&gt;
also able to grab the mutex when needed for the onCommit/onRollback&lt;br/&gt;
callbacks.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 71a149b45c8bb019cbc8179f4a411be66bda2062)&lt;br/&gt;
(cherry picked from commit 99d1ad9e6ef9bd270f9f668966a71596a71f7f72)&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b188121303e27761b34bfb67be0732c346999168&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b188121303e27761b34bfb67be0732c346999168&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1557137" author="xgen-internal-githook" created="Tue, 25 Apr 2017 13:57:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dgottlieb&apos;, u&apos;name&apos;: u&apos;Daniel Gottlieb&apos;, u&apos;email&apos;: u&apos;daniel.gottlieb@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28737&quot; title=&quot;Have ephemeralForTest use std::mutex for protecting its internal data structures&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28737&quot;&gt;&lt;del&gt;SERVER-28737&lt;/del&gt;&lt;/a&gt;: Have ephemeralForTest use std::mutex to not consume LockManager resources&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/99d1ad9e6ef9bd270f9f668966a71596a71f7f72&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/99d1ad9e6ef9bd270f9f668966a71596a71f7f72&lt;/a&gt;&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>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.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="14340"><![CDATA[v3.4]]></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>Tue, 25 Apr 2017 13:57:24 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 32 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 32 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht5mtb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hraufz:</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="1634">Storage 2017-04-17</customfieldvalue>
    <customfieldvalue id="1670">Storage 2017-05-08</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|hs4bdj:</customfieldvalue>

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