<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:51:47 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-39355] Collection drops can block the server for long periods</title>
                <link>https://jira.mongodb.org/browse/SERVER-39355</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hi, sorry but we&apos;ve just had another occurrence today (still running 3.4.13) so there&apos;s still an issue here. We&apos;ve modified our code to drop collection to sleep 10 sec between each deletion (to give mongo some time to recover after the &quot;short&quot; global lock and not kill the platform) but unfortunately this wasn&apos;t enough and it killed the global performance:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/203795/screenshot-4.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;After investigation I found that this was cause by some collection deletion. I tried to upload the diagnostic.data but the portal specified earlier doesn&apos;t accept files any more. I can upload it if you give another portal.&lt;/p&gt;

&lt;p&gt;Here is the log from the drop queries: &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/207939/207939_mongo_drop_log.txt&quot; title=&quot;mongo_drop_log.txt attached to SERVER-39355&quot;&gt;mongo_drop_log.txt&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;, we can see here that they are spaced by 10sec (+drop duration) and that the drop take A LOT of time (all these collections were empty or had 5 records at most). They had some indexes though, which are not shown here but probably had to be destroyed at the same time. I don&apos;t know if it&apos;s a checkpoint global lock issue again but it&apos;s definitely still not possible to drop collection in a big 3.4.13 mongo without killing it. For the record we have ~40k namespaces, this has not changed much since the db.stats I reported above.&lt;/p&gt;

&lt;p&gt;And before you say this is probably fixed in a more recent version, we&apos;ll need better proof than last time considering the high risk of upgrading...&lt;/p&gt;</description>
                <environment></environment>
        <key id="682317">SERVER-39355</key>
            <summary>Collection drops can block the server for long periods</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="9">Done</resolution>
                                        <assignee username="donald.anderson@mongodb.com">Donald Anderson</assignee>
                                    <reporter username="milkie@mongodb.com">Eric Milkie</reporter>
                        <labels>
                    </labels>
                <created>Fri, 1 Feb 2019 22:00:58 +0000</created>
                <updated>Thu, 28 Feb 2019 17:56:29 +0000</updated>
                            <resolved>Thu, 14 Feb 2019 17:33:54 +0000</resolved>
                                    <version>3.4.14</version>
                                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="2149865" author="donald.anderson" created="Thu, 14 Feb 2019 17:33:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bigbourin%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;bigbourin@gmail.com&quot;&gt;bigbourin@gmail.com&lt;/a&gt;, I understand. I&apos;m going to close this ticket, please reopen if you need any more help on this.&lt;/p&gt;</comment>
                            <comment id="2147487" author="bigbourin@gmail.com" created="Wed, 13 Feb 2019 16:45:13 +0000"  >&lt;p&gt;I see, thanks for the details. Looks like a possible cause indeed, we&apos;ll try to let you know after we update to 3.6 but we&apos;re kind of skeptic because of all the trouble we had with mongo upgrades in the past and all the regressions there were in 3.6 so far. &lt;/p&gt;</comment>
                            <comment id="2146136" author="donald.anderson" created="Tue, 12 Feb 2019 16:59:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bigbourin%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;bigbourin@gmail.com&quot;&gt;bigbourin@gmail.com&lt;/a&gt;,&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32424&quot; title=&quot;Use WiredTiger cursor caching&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32424&quot;&gt;&lt;del&gt;SERVER-32424&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38779&quot; title=&quot;Build a mechanism to periodically cleanup old WT sessions from session cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38779&quot;&gt;&lt;del&gt;SERVER-38779&lt;/del&gt;&lt;/a&gt; are relevant to this discussion. The use of WiredTiger cursor caching available in MongoDB 3.6/4.0 and enabled by&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32424&quot; title=&quot;Use WiredTiger cursor caching&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32424&quot;&gt;&lt;del&gt;SERVER-32424&lt;/del&gt;&lt;/a&gt; was designed to address the problem of collections that cannot be dropped. Before those changes, every MongoDB session could hold up to 10000 cursors open, whether or not they are currently being used by that session. Those cursors are held open in the cursor cache even when the session is cached and not in use, and when the session is reused to service new requests. While this generally avoids expensive cursor opens, the downside is that any open cursor on a table prevents the collection associated with that table from being dropped. We believe that is what is happening here. There large number of open cursors are is one piece of evidence.&lt;/p&gt;

&lt;p&gt;The switch to use WT cursor caching that is enabled by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32424&quot; title=&quot;Use WiredTiger cursor caching&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32424&quot;&gt;&lt;del&gt;SERVER-32424&lt;/del&gt;&lt;/a&gt; pushes the caching of cursors down to the WT session. We have reference counting on the WT cursors and keep &quot;active&quot; and &quot;passive&quot; (only cached) reference counts to the underlying tables. WiredTiger allow drops of tables that have no active references. When a MongoDB session finishes processing a request, cursors used in that request are cached in WT, which changes the active references to passive. The end result is that a collection can be dropped as soon as requests that use that collection complete.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38779&quot; title=&quot;Build a mechanism to periodically cleanup old WT sessions from session cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38779&quot;&gt;&lt;del&gt;SERVER-38779&lt;/del&gt;&lt;/a&gt; is also part of this set of fixes, it closes old MongoDB sessions that have been idle for a long time. While these sessions may not prevent collections from being dropped, they will still hold cached cursors to the underlying tables as passive references, and that prevents the actual files with the dropped table data from being removed, as well as preventing some internal data structures (&quot;dhandles&quot;) from being freed.&lt;/p&gt;

&lt;p&gt;Both &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32424&quot; title=&quot;Use WiredTiger cursor caching&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32424&quot;&gt;&lt;del&gt;SERVER-32424&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38779&quot; title=&quot;Build a mechanism to periodically cleanup old WT sessions from session cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38779&quot;&gt;&lt;del&gt;SERVER-38779&lt;/del&gt;&lt;/a&gt; are a part of the 3.6 and 4.0 release.&#160;Because of this and the connection that you see between the server blocking and collection drops, we think that an upgrade should help.&lt;/p&gt;</comment>
                            <comment id="2136290" author="bigbourin@gmail.com" created="Mon, 4 Feb 2019 09:27:16 +0000"  >&lt;p&gt;Thanks, the file is uploaded.&lt;/p&gt;</comment>
                            <comment id="2135614" author="thomas.schubert" created="Fri, 1 Feb 2019 22:13:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://10gen-httpsupload.s3.amazonaws.com/upload_forms/be24184e-5942-48d0-ac88-a99137e622f1.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Secure upload portal&lt;/a&gt;&#160;for this issue.&lt;/p&gt;</comment>
                            <comment id="2135597" author="milkie" created="Fri, 1 Feb 2019 22:03:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kelsey.schubert&quot; class=&quot;user-hover&quot; rel=&quot;kelsey.schubert&quot;&gt;kelsey.schubert&lt;/a&gt; can you set up a new portal for Adrien to upload the diagnostic data?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="346241">SERVER-27700</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="487229">SERVER-32890</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="197937">WT-1598</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="474781">SERVER-32424</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="661712">SERVER-38779</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="208320" name="Screen Shot 2019-02-06 at 12.01.40 PM.png" size="142977" author="eric.sedor@mongodb.com" created="Wed, 6 Feb 2019 20:50:33 +0000"/>
                            <attachment id="207939" name="mongo_drop_log.txt" size="19000" author="milkie@mongodb.com" created="Fri, 1 Feb 2019 22:05:20 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 1 Feb 2019 22:13:25 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 51 weeks, 6 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>kelsey.schubert@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 51 weeks, 6 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>bigbourin@gmail.com</customfieldvalue>
            <customfieldvalue>donald.anderson@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hukzbb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|huauon:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="2805">Storage Engines 2019-02-25</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</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>
                                    <customfieldvalue><![CDATA[eric.sedor@mongodb.com]]></customfieldvalue>
    

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huklkn:</customfieldvalue>

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