<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:46:19 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-37552] Illegal concurrent access to KVDatabaseCatalogEntryBase::_collections</title>
                <link>https://jira.mongodb.org/browse/SERVER-37552</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;There is an apparent thread-safety error which can occur if a &lt;tt&gt;listDatabases&lt;/tt&gt; command is running concurrently with a &lt;tt&gt;renameCollection&lt;/tt&gt; command. This is closely related to the problem observed in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34531&quot; title=&quot;listDatabases command can miss a database if a collection in that database is renamed concurrently&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34531&quot;&gt;&lt;del&gt;SERVER-34531&lt;/del&gt;&lt;/a&gt;. As described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34531&quot; title=&quot;listDatabases command can miss a database if a collection in that database is renamed concurrently&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34531&quot;&gt;&lt;del&gt;SERVER-34531&lt;/del&gt;&lt;/a&gt;, the &lt;tt&gt;listDatabases&lt;/tt&gt; command takes a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/list_databases.cpp?utf8=%E2%9C%93#L116-L119&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;GlobalLock in MODE_IS&lt;/a&gt;. The &lt;tt&gt;renameCollection&lt;/tt&gt; command acquires a GlobalLock in MODE_IX and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2b20c142c7e15cdad1ef609bcb5f14ba288dacea/src/mongo/db/catalog/rename_collection.cpp#L136&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;a MODE_X&lt;/a&gt; database lock on the database on which it is performing the rename. Global locks of type IX and IS do not conflict, so the &lt;tt&gt;listDatabases&lt;/tt&gt; command and &lt;tt&gt;renameCollection&lt;/tt&gt; command are allowed to run concurrently.&lt;/p&gt;

&lt;p&gt;The &lt;tt&gt;listDatabases&lt;/tt&gt; command reads from &lt;tt&gt;KVDatabaseCatalogEntryBase::_collections&lt;/tt&gt;, a &lt;tt&gt;std::map&lt;/tt&gt; which is not thread-safe, in order to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2b20c142c7e15cdad1ef609bcb5f14ba288dacea/src/mongo/db/storage/kv/kv_database_catalog_entry_base.cpp#L132-L134&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;check whether the database is empty&lt;/a&gt;. At the same time, the &lt;tt&gt;renameCollection&lt;/tt&gt; may be &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c405add0814ea4cc819588d26fe315369319e010/src/mongo/db/storage/kv/kv_database_catalog_entry_base.cpp#L321-L333&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;writing to the &lt;tt&gt;_collections&lt;/tt&gt; map&lt;/a&gt; in order to represent the rename in the catalog data structures.&lt;/p&gt;

&lt;p&gt;As far as I can tell, the fix for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34531&quot; title=&quot;listDatabases command can miss a database if a collection in that database is renamed concurrently&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34531&quot;&gt;&lt;del&gt;SERVER-34531&lt;/del&gt;&lt;/a&gt; ensured that &lt;tt&gt;listDatabases&lt;/tt&gt; would not fail to report a database due to a concurrent rename, but it did not prevent concurrent access to the &lt;tt&gt;_collections&lt;/tt&gt; map.&lt;/p&gt;</description>
                <environment></environment>
        <key id="616718">SERVER-37552</key>
            <summary>Illegal concurrent access to KVDatabaseCatalogEntryBase::_collections</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="geert.bosch@mongodb.com">Geert Bosch</assignee>
                                    <reporter username="david.storch@mongodb.com">David Storch</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Oct 2018 19:54:44 +0000</created>
                <updated>Sun, 29 Oct 2023 22:27:30 +0000</updated>
                            <resolved>Tue, 7 Apr 2020 16:03:33 +0000</resolved>
                                                    <fixVersion>4.2.0</fixVersion>
                                    <component>Catalog</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2031876" author="ian@10gen.com" created="Fri, 12 Oct 2018 19:48:22 +0000"  >&lt;p&gt;after the linked ticket is complete we can remove the concurrent access.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="496684">SERVER-33272</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="687910">SERVER-39507</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="529900">SERVER-34531</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>1.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 12 Oct 2018 19:48:22 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 17 weeks, 5 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-33272'>SERVER-33272</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-39507'>SERVER-39507</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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 17 weeks, 5 days 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>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>geert.bosch@mongodb.com</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu9yq7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr64av:</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="3633">Execution Team 2020-04-06</customfieldvalue>
    <customfieldvalue id="3634">Execution Team 2020-04-20</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|hu9kzj:</customfieldvalue>

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