<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:49:39 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-60374] Unique index performance degradation after upgrading from 4.4.3 to 5.0.3</title>
                <link>https://jira.mongodb.org/browse/SERVER-60374</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The issue is the following:&lt;/p&gt;

&lt;p&gt;I have a testing environment with bunch of integration tests running one after the other. They are using MongoDB, and using the same database and collections.&lt;/p&gt;

&lt;p&gt;I only have some unique indices there and there, there are no regular indices.&lt;/p&gt;

&lt;p&gt;Between fixtures I reset the database just by calling &lt;b&gt;collection.deleteMany({})&lt;/b&gt; in each collection.&lt;/p&gt;

&lt;p&gt;In 4.4.3 it was fine, but after 5.0.3 upgrade I noticed a serious performance&#160;degradation. After some investigation, I found that every test case took a slightly more time to run than the previous one, and it slowly added up, and to the end I can see test cases took 2x more time to finish than did with 4.4.3.&lt;/p&gt;

&lt;p&gt;What I ended up with, when I drop and recreate indices between fixtures, I get the same performance as it was with 4.4.3.&lt;/p&gt;

&lt;p&gt;So I suspect that somehow unique indices of deleted entries are not getting deleted automatically causing performance degradation for live data.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1887668">SERVER-60374</key>
            <summary>Unique index performance degradation after upgrading from 4.4.3 to 5.0.3</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="eric.sedor@mongodb.com">Eric Sedor</assignee>
                                    <reporter username="gabor42mezo@gmail.com">G&#225;bor Mez&#337;</reporter>
                        <labels>
                    </labels>
                <created>Fri, 1 Oct 2021 09:16:16 +0000</created>
                <updated>Mon, 11 Jul 2022 21:29:59 +0000</updated>
                            <resolved>Mon, 11 Jul 2022 21:29:59 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="4671951" author="eric.sedor" created="Mon, 11 Jul 2022 21:29:37 +0000"  >&lt;p&gt;We haven&#8217;t heard back from you for some time, so I&#8217;m going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;</comment>
                            <comment id="4545087" author="brooke.miller" created="Thu, 12 May 2022 14:51:02 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gabor42mezo%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;gabor42mezo@gmail.com&quot;&gt;gabor42mezo@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;We still need additional information to diagnose the problem. If this is still an issue for you, would you please provide the information Eric requested above?&lt;/p&gt;


&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Brooke&lt;/p&gt;</comment>
                            <comment id="4392739" author="eric.sedor" created="Fri, 4 Mar 2022 22:27:08 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gabor42mezo%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;gabor42mezo@gmail.com&quot;&gt;gabor42mezo@gmail.com&lt;/a&gt;; Since I&apos;ve been unable to reproduce this, would you be able archive (tar or zip) the &lt;tt&gt;$dbpath/diagnostic.data&lt;/tt&gt; directory (the contents are described &lt;a href=&quot;https://docs.mongodb.com/manual/administration/analyzing-mongodb-performance/#full-time-diagnostic-data-capture&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;) for this test on both 4.4.11 and 5.0.6, and attach them to this ticket?&lt;/p&gt;</comment>
                            <comment id="4391346" author="JIRAUSER1262497" created="Fri, 4 Mar 2022 13:24:43 +0000"  >&lt;ol&gt;
	&lt;li&gt;Confirmed, all settings are the same.&lt;/li&gt;
	&lt;li&gt;Don&apos;t know exactly, but approx. over hundreds.&lt;/li&gt;
	&lt;li&gt;I don&apos;t know where this came from. Overall test running performance is way much worse. I can make it much better when I delete all indices before calling deleteMany and recreate them afterwards when the database gets empty.&lt;/li&gt;
	&lt;li&gt;Various documents, 20 on fields average. They can be quite large because of internal arrays.&lt;/li&gt;
	&lt;li&gt;I&apos;m only using unique indices during testing, because added functionality of indices is to prevent duplicates arise.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="4351956" author="JIRAUSER1262497" created="Sat, 12 Feb 2022 08:39:34 +0000"  >&lt;p&gt;Hey, sorry, the notification got landed in my spam folder. I&apos;m gonna get back to you on Monday.&lt;/p&gt;</comment>
                            <comment id="4325965" author="eric.sedor" created="Mon, 31 Jan 2022 21:09:44 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gabor42mezo%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;gabor42mezo@gmail.com&quot;&gt;gabor42mezo@gmail.com&lt;/a&gt;, can I follow up with you on my questions above?&lt;/p&gt;</comment>
                            <comment id="4135958" author="eric.sedor" created="Wed, 20 Oct 2021 17:30:57 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gabor42mezo%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;gabor42mezo@gmail.com&quot;&gt;gabor42mezo@gmail.com&lt;/a&gt;, and thank you so far. I&apos;ve been investigating the possible relationship to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57221&quot; title=&quot;Inconsistent delete performance on collections with multiple secondary indexes on same key&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57221&quot;&gt;&lt;del&gt;SERVER-57221&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/WT-7653&quot; title=&quot;Inconsistent update performance on unique indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;WT-7653&quot;&gt;WT-7653&lt;/a&gt;, and &lt;a href=&quot;https://jira.mongodb.org/browse/WT-7912&quot; title=&quot;Fix prefix search near optimisation to handle scenarios where the key range is split across pages.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;WT-7912&quot;&gt;&lt;del&gt;WT-7912&lt;/del&gt;&lt;/a&gt; but can&apos;t conclusively link your report to these so far.&lt;/p&gt;

&lt;p&gt;I&apos;ve also attempted an initial reproduction without much success. Can you please provide some additional information about your proposed reproduction:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Can you confirm the writeConcern you are using for your reproduction, and confirm that it is the same for 4.4.3 and 5.0.3?&lt;/li&gt;
	&lt;li&gt;Over how many iterations do you see what kind of magnitude of increase in time?&lt;/li&gt;
	&lt;li&gt;Can you clarify if the timing you describe includes both the insert and delete steps? Have you confirmed the time increase is on deleteMany only?&lt;/li&gt;
	&lt;li&gt;Can you describe the documents you are inserting in terms of size/field count?&lt;/li&gt;
	&lt;li&gt;Are there other indexes on the collection, and if so how many and of what field counts?&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.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 Oct 2021 22:19:19 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 30 weeks, 2 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>eric.sedor@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 30 weeks, 2 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>brooke.miller@mongodb.com</customfieldvalue>
            <customfieldvalue>eric.sedor@mongodb.com</customfieldvalue>
            <customfieldvalue>gabor42mezo@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i03w67:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hznniv:</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;ol&gt;
	&lt;li&gt;create a collection with a unique index&lt;/li&gt;
	&lt;li&gt;save few hundred documents&lt;/li&gt;
	&lt;li&gt;deleteMany({})&lt;/li&gt;
	&lt;li&gt;GOTO 2&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The required time between 2-4 slowly increases with 5.0.3, but stay the same with 4.4.3.&lt;/p&gt;</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|i03ibj:</customfieldvalue>

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