<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:42:02 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-57511] Only the index build operation should remove the indexBuilds document on index build abort/commit</title>
                <link>https://jira.mongodb.org/browse/SERVER-57511</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;dropIndexes runs &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bcd1f32d78c28f789a88a5c0936cded36abc7386/src/mongo/db/index_builds_coordinator.cpp#L1214&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this code to remove the indexBuilds document&lt;/a&gt; used by an in-progress index build. This can lead to strange (internal system details) user index build errors like the one identified in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56279&quot; title=&quot;Index build failure errors with NoMatchingDocument as cause of commit quorum failing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56279&quot;&gt;SERVER-56279&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Further work is necessary to ensure that the index build thread, when aborted, always cleans up its own indexBuilds document.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1771082">SERVER-57511</key>
            <summary>Only the index build operation should remove the indexBuilds document on index build abort/commit</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="backlog-server-execution">Backlog - Storage Execution Team</assignee>
                                    <reporter username="dianna.hohensee@mongodb.com">Dianna Hohensee</reporter>
                        <labels>
                            <label>techdebt</label>
                    </labels>
                <created>Mon, 7 Jun 2021 21:06:07 +0000</created>
                <updated>Tue, 6 Dec 2022 01:15:06 +0000</updated>
                            <resolved>Thu, 10 Jun 2021 18:04:18 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3866716" author="dianna.hohensee" created="Tue, 8 Jun 2021 16:51:07 +0000"  >&lt;p&gt;Okay, it sounds like the secondary index build thread isn&apos;t listening for the abort/commit, and we don&apos;t have a means of otherwise running the clean up on the secondary.&lt;/p&gt;

&lt;p&gt;Then in lieu of making significant changes, we should better handle the error thrown to the user.&lt;/p&gt;</comment>
                            <comment id="3866416" author="louis.williams" created="Tue, 8 Jun 2021 15:25:49 +0000"  >&lt;p&gt;I&apos;m mostly thinking about case number 2. If an index build has replicated the startIndexBuild oplog entry, if the index build thread is interrupted for any reason, it needs to be guaranteed to replicate an abortIndexBuild oplog entry. We can&apos;t guarantee that it will be the case, for the reasons I state above. If it can&apos;t replicate (because of a step-down, for example), then we&apos;ve just killed the index builder thread and left the catalog in an unfinished state. So a new primary might be able to commit/abort, but the old primary isn&apos;t building the index anymore.&lt;/p&gt;

&lt;p&gt;I could imagine a solution where we entirely restart an index build if the thread exits without cleaning up, but that would be quite an undertaking and we rejected that solution in favor of the alternative: forcing the caller to clean up.&lt;/p&gt;</comment>
                            <comment id="3865982" author="dianna.hohensee" created="Tue, 8 Jun 2021 13:42:20 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=louis.williams&quot; class=&quot;user-hover&quot; rel=&quot;louis.williams&quot;&gt;louis.williams&lt;/a&gt; Oh, that&apos;s interesting. I would have thought that if Server A is primary, and building an index, and then is externally aborted and steps down before cleaning up, one of two things could happen:&lt;/p&gt;

&lt;p&gt;1. Server A&apos;s startIndexBuilds oplog entry was not replicated, so therefore the persisted data gets rolled back.&lt;/p&gt;

&lt;p&gt;2. Server A&apos;s startIndexBuilds oplog entry was replicated, and the new primary would clean up the index build.&lt;/p&gt;

&lt;p&gt;Is the current design because some writes didn&apos;t used to be timestamped?&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Regarding &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56279&quot; title=&quot;Index build failure errors with NoMatchingDocument as cause of commit quorum failing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56279&quot;&gt;SERVER-56279&lt;/a&gt;, we could patch for the NoMatchingDocument error. My concern with that fix is that it&apos;s a bandaid that might not stop other internal errors from popping up at the user level. We have identified the particular problem point, though, the async document deletion. So we could just manage the functions pertaining to accessing the document and choose wrap the error with a better explanation for the user.&lt;/p&gt;</comment>
                            <comment id="3863846" author="louis.williams" created="Mon, 7 Jun 2021 22:17:17 +0000"  >&lt;p&gt;We very intentionally designed index builds so that the calling operation (i.e. dropIndexes), not the index build thread, is responsible for 1. taking locks 2. performing writes 3. interrupting the thread.&lt;/p&gt;

&lt;p&gt;The alternative, as you proposed, means we would have to deal with an entirely different set of problems.&#160;If an index build is interrupted and releases its locks, it may be unable to reacquire its locks and delete the catalog entry and replicate an oplog entry. Once the thread is interrupted or the node is no longer primary, the only option we have is to crash.&lt;/p&gt;

&lt;p&gt;Regarding &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56279&quot; title=&quot;Index build failure errors with NoMatchingDocument as cause of commit quorum failing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56279&quot;&gt;SERVER-56279&lt;/a&gt;, would it be possible to instead suppress a NoMatchingDocument error?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1687475">SERVER-56279</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>4.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 7 Jun 2021 22:17:17 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 35 weeks, 1 day 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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 35 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-execution</customfieldvalue>
            <customfieldvalue>dianna.hohensee@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|hzk4kv:</customfieldvalue>

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

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