<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:02:33 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-43206] All callers of DatabaseImpl::dropCollectionEvenIfSystem must first assert under a lock that no index builds are in progress</title>
                <link>https://jira.mongodb.org/browse/SERVER-43206</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;b&gt;TLDR: &lt;tt&gt;DatabaseImpl::dropCollectionEvenIfSystem&lt;/tt&gt; invariants against index builds in progress by looking at the &lt;tt&gt;IndexCatalog&lt;/tt&gt; state. However, the &lt;tt&gt;IndexBuildsCoordinator&lt;/tt&gt; needs to clean up state after an index build, expecting the collection to continue to exist, without a lock.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;----------------------------------&lt;br/&gt;
As described in the linked test failure, &lt;tt&gt;DatabaseImpl::dropCollectionEvenIfSystem&lt;/tt&gt;, which is always called under a collection X lock (an invariant), will invariant against any index builds being in progress according to the &lt;tt&gt;IndexCatalog&lt;/tt&gt;. However, the &lt;tt&gt;IndexCatalog&lt;/tt&gt; will be told an index build is complete before the &lt;tt&gt;IndexBuildsCoordinator&lt;/tt&gt; (MultiIndexBlock::cleanUpAfterBuild, IndexBuildInterceptor, etc.) state has been cleaned up. We no longer hold a lock across index build tear down, so &lt;tt&gt;DatabaseImpl::dropCollectionEvenIfSystem&lt;/tt&gt; is able to go ahead and drop the collection, when the index build still needs it to exist. All callers of &lt;tt&gt;DatabaseImpl::dropCollectionEvenIfSystem&lt;/tt&gt;, therefore, must check with BackgroundOperation and IndexBuildsCoordinator that no index builds are in progress &amp;#8211; clearly one of the callers is not doing this check, because of the test failure (I didn&apos;t go ahead and look for which caller, because there are a lot of them to look at).&lt;/p&gt;

&lt;p&gt;That&apos;s ^ one proposal for how to fix the problem. I haven&apos;t thought about other options. It isn&apos;t great because there&apos;s no way to enforce new callers of &lt;tt&gt;DatabaseImpl::dropCollectionEvenIfSystem&lt;/tt&gt; don&apos;t mess up.&lt;/p&gt;

&lt;p&gt;-------------------------------&lt;br/&gt;
Prior to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42487&quot; title=&quot;Acquire locks by UUID in IndexBuildsCoordinator::_buildIndex &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42487&quot;&gt;&lt;del&gt;SERVER-42487&lt;/del&gt;&lt;/a&gt;, this bug was feasible, but much less likely to occur. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42487&quot; title=&quot;Acquire locks by UUID in IndexBuildsCoordinator::_buildIndex &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42487&quot;&gt;&lt;del&gt;SERVER-42487&lt;/del&gt;&lt;/a&gt; Moved index build database and collection locks into &lt;a href=&quot;https://github.com/mongodb/mongo/commit/9fffb12c5981175273fb202183ebc30381616cbc#diff-9050cdcc09ac551d4a8377c1d7fd43efR743&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;a smaller scope&lt;/a&gt; because it wasn&apos;t guaranteed that the locks would still be locked after that smaller scope ran, in the larger scope. So previously, index builds would have been unprotected only when the index build threw an error; now, it&apos;s always unprotected, surfacing this bug &amp;#8211; at least I think it&apos;s a bug, and if it isn&apos;t, then we need better documentation that successful index builds need a lock and unsuccessful index builds don&apos;t need a lock for tear down.&lt;/p&gt;</description>
                <environment></environment>
        <key id="918918">SERVER-43206</key>
            <summary>All callers of DatabaseImpl::dropCollectionEvenIfSystem must first assert under a lock that no index builds are in progress</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="13203">Gone away</resolution>
                                        <assignee username="gregory.wlodarek@mongodb.com">Gregory Wlodarek</assignee>
                                    <reporter username="dianna.hohensee@mongodb.com">Dianna Hohensee</reporter>
                        <labels>
                            <label>groomed</label>
                    </labels>
                <created>Fri, 6 Sep 2019 19:46:07 +0000</created>
                <updated>Fri, 27 Oct 2023 20:42:41 +0000</updated>
                            <resolved>Fri, 20 Mar 2020 20:35:43 +0000</resolved>
                                                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2990755" author="gregory.wlodarek" created="Fri, 20 Mar 2020 20:34:58 +0000"  >&lt;p&gt;I took a look at this and the associated BF. With the abort changes made to&#160;&lt;b&gt;drop&lt;/b&gt;&#160;(&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46122&quot; title=&quot;Make the drop command abort in-progress index builds&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46122&quot;&gt;&lt;del&gt;SERVER-46122&lt;/del&gt;&lt;/a&gt;) and&#160;&lt;b&gt;dropDatabase&lt;/b&gt; (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46123&quot; title=&quot;Make the dropDatabase command abort in-progress index builds&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46123&quot;&gt;&lt;del&gt;SERVER-46123&lt;/del&gt;&lt;/a&gt;) a while back, I&apos;m confident that those changes will prevent this event from reoccurring.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;When you drop a collection or database today, we first abort all in-progress index builds on the respective collections.&lt;/li&gt;
	&lt;li&gt;We replicate the abortIndexBuild oplog entry before replication the drops to the secondaries.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Today, in no way should we be dropping collections with index builds still registered to the IndexBuildsCoordinator.&lt;/p&gt;</comment>
                            <comment id="2914935" author="dianna.hohensee" created="Thu, 27 Feb 2020 19:33:45 +0000"  >&lt;p&gt;We would have to look at how index build tear down works now (if it has a final form).&lt;/p&gt;

&lt;p&gt;The BF was closed because it didn&apos;t reoccur for a long time, not because there was a known fix that went into master.&lt;/p&gt;</comment>
                            <comment id="2887483" author="connie.chen" created="Thu, 20 Feb 2020 21:25:44 +0000"  >&lt;p&gt;Review whether this is necessary as the linked BF seems to have gone away&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1145928">SERVER-46122</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1145929">SERVER-46123</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="878872">SERVER-42487</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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>Thu, 20 Feb 2020 21:25:44 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 46 weeks, 5 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>luke.bonanomi@mongodb.com</customfieldvalue>

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

                        </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>connie.chen@mongodb.com</customfieldvalue>
            <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>gregory.wlodarek@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvovif:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwtkmf:</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>

                        </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|hvohrr:</customfieldvalue>

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