<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:36:34 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-55476] Database profiling should not serialize writes on all collections</title>
                <link>https://jira.mongodb.org/browse/SERVER-55476</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Capped inserts on the primary are serialized because capped inserts on secondaries need to be serialized, and we need both primary and secondary to have the same level of write parallelism. Capped inserts on the secondary need to be serialized because we can only use the oplog to determine the ordering. This is a problem for a the &lt;tt&gt;system.profile&lt;/tt&gt; collection which we use for Database profiling, since, in order to achieve the above, we use the metadata lock acquisition. This effectively produces database-level exclusive locking granularity for both reads and writes when the profiler is enabled.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1657682">SERVER-55476</key>
            <summary>Database profiling should not serialize writes on all collections</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="13203">Gone away</resolution>
                                        <assignee username="backlog-server-execution">Backlog - Storage Execution Team</assignee>
                                    <reporter username="dmitry.agranat@mongodb.com">Dmitry Agranat</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Mar 2021 12:03:08 +0000</created>
                <updated>Fri, 27 Oct 2023 20:46:09 +0000</updated>
                            <resolved>Fri, 6 May 2022 16:05:24 +0000</resolved>
                                                                    <component>Storage</component>
                                        <votes>1</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="4531724" author="louis.williams" created="Fri, 6 May 2022 16:05:24 +0000"  >&lt;p&gt;This was fixed (unintentionally) by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61277&quot; title=&quot;Allow concurrent writes on capped clustered collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61277&quot;&gt;&lt;del&gt;SERVER-61277&lt;/del&gt;&lt;/a&gt; in version 5.3.0. The profiler no longer introduces a bottleneck by serializing reads and writes on the database.&lt;/p&gt;

&lt;p&gt;What used to be true about all local collections is now true for the system.profile collection: tailable cursors may miss writes when operations are inserted out-of-order.&lt;/p&gt;

&lt;p&gt;I have filed &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-66283&quot; title=&quot;Tailable cursors can miss writes on unreplicated capped collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-66283&quot;&gt;&lt;del&gt;SERVER-66283&lt;/del&gt;&lt;/a&gt; to consider banning tailable cursors on unreplicated capped collections entirely.&lt;/p&gt;</comment>
                            <comment id="4190055" author="louis.williams" created="Mon, 15 Nov 2021 20:21:11 +0000"  >&lt;p&gt;It will be very straightforward to stop taking the capped lock for unreplicated collections. As mentioned, this will break tailable cursors, however.&lt;/p&gt;

&lt;p&gt;I&apos;m not particularly interested in finding out whether any users depend on being able to tail the profile collection, so I have an idea. There has been some renewed interest in&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18934&quot; title=&quot;Don&amp;#39;t require storage engines to implement oplog visibility rules&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18934&quot;&gt;SERVER-18934&lt;/a&gt;, which would track oplog visibility above the storage engine. Implemented correctly, we could extend this visibility tracking logic to all capped collections. In this way, we can allow concurrent inserts into the profile collection and continue supporting tailable cursors.&lt;/p&gt;</comment>
                            <comment id="3748853" author="louis.williams" created="Fri, 30 Apr 2021 14:52:20 +0000"  >&lt;p&gt;Note that capped deletes are still serialized by a mutex. So while this improvement will allow unreplicated capped collections to avoid taking the X metadata lock for the duration of the insert operation, there will still be a small critical section for operations that are tasked with deleting excess documents.&lt;/p&gt;</comment>
                            <comment id="3681679" author="bruce.lucas@10gen.com" created="Wed, 24 Mar 2021 15:35:19 +0000"  >&lt;p&gt;I think we might also need to consider the relative cost of truncating a capped collection vs removing expired entries from a ttl collection.&lt;/p&gt;</comment>
                            <comment id="3681350" author="louis.williams" created="Wed, 24 Mar 2021 13:48:46 +0000"  >&lt;p&gt;The system.profile collection is a special case for capped collections because it is not replicated. We already avoid taking the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7cfa7de2c1b8cefa90e0b6f4a24f13a0aa3c448a/src/mongo/db/catalog/collection_impl.cpp#L745-L746&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;metadata lock&lt;/a&gt; when the collection is on the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7cfa7de2c1b8cefa90e0b6f4a24f13a0aa3c448a/src/mongo/db/catalog/collection_impl.cpp#L223&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;local database&lt;/a&gt;. I think we should consider a solution where we extend this to avoid taking the metadata lock on special unreplicated collections like &lt;tt&gt;system.profile&lt;/tt&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="210112">SERVER-18934</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="306423" name="profiling.png" size="145918" author="bruce.lucas@mongodb.com" created="Wed, 24 Mar 2021 17:46:56 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25136"><![CDATA[Storage Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5006R00001sCXjRQAW]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 24 Mar 2021 13:48:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 39 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<a href='https://jira.mongodb.org/browse/SERVER-18934'>SERVER-18934</a>]]></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>
                            1 year, 39 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-execution</customfieldvalue>
            <customfieldvalue>bruce.lucas@mongodb.com</customfieldvalue>
            <customfieldvalue>dmitry.agranat@mongodb.com</customfieldvalue>
            <customfieldvalue>louis.williams@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hz0yyn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr25qf:</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="5421">Execution Team 2021-11-15</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|hz0l7r:</customfieldvalue>

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