<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:28:58 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-74953] Explore avoiding stepdowns during the early phases of index build setup</title>
                <link>https://jira.mongodb.org/browse/SERVER-74953</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Explore avoiding stepdowns during the early phases of index build setup, until the build reaches &lt;a href=&quot;https://github.com/10gen/mongo/blob/ba2d20d1dc6493dd7930b13e7275dbb095952b3b/src/mongo/db/repl_index_build_state.h#L135&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;kPostSetup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Original description&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;An index build can register and get stuck trying to acquire a ticket to actually do the setup (and replicate startIndexBuild). So it is possible for the index build to be registered, when a stepdown happens, which does not kill the builders opCtx, and the build is still stuck after going into steady state replication as secondary. The new primary drops the collection, and on applying the drop in the secondary, we assert that there are no builds in progress... but there is one which is registered because the old primary has not yet advanced to a point where it checks if it is still primary.&lt;/p&gt;

&lt;p&gt;Being blocked on ticket acquisition is not a necessity for this to manifest, as a sufficiently slow machine could theoretically suffer from the same issue.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2290026">SERVER-74953</key>
            <summary>Explore avoiding stepdowns during the early phases of index build setup</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="yujin.kang@mongodb.com">Yujin Kang Park</assignee>
                                    <reporter username="yujin.kang@mongodb.com">Yujin Kang Park</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Mar 2023 16:01:49 +0000</created>
                <updated>Tue, 4 Jul 2023 14:23:12 +0000</updated>
                            <resolved>Thu, 15 Jun 2023 08:57:09 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5542664" author="xgen-internal-githook" created="Tue, 4 Jul 2023 14:23:12 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Yu Jin Kang Park&apos;, &apos;email&apos;: &apos;yujin.kang@mongodb.com&apos;, &apos;username&apos;: &apos;ykangpark&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-78143&quot; title=&quot;Complete TODO listed in SERVER-74953&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-78143&quot;&gt;&lt;del&gt;SERVER-78143&lt;/del&gt;&lt;/a&gt; Remove TODO &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-74953&quot; title=&quot;Explore avoiding stepdowns during the early phases of index build setup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-74953&quot;&gt;&lt;del&gt;SERVER-74953&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a897690f1a192921fa8ddfdd002ed2513af14275&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a897690f1a192921fa8ddfdd002ed2513af14275&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5500840" author="JIRAUSER1265133" created="Thu, 15 Jun 2023 08:57:09 +0000"  >&lt;p&gt;&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77025&quot; title=&quot;Command application conflicting with index build should wait for its completion (partial revert of SERVER-61481)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77025&quot;&gt;&lt;del&gt;SERVER-77025&lt;/del&gt;&lt;/a&gt; fixed the bug described in this ticket by reverting to a previous behaviour. Avoiding stepdowns during setup or delaying registering the index build until setup is complete is not trivial. This would be better addressed more holistically in a re-design of index builds. Since the bug is fixed, closing as &quot;Won&apos;t Fix&quot;.&lt;/p&gt;</comment>
                            <comment id="5451314" author="JIRAUSER1265133" created="Thu, 25 May 2023 10:00:41 +0000"  >&lt;p&gt;Linking &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44250&quot; title=&quot;startIndexBuild oplog write and thread pool scheduling are not serialized between concurrent threads on primaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44250&quot;&gt;&lt;del&gt;SERVER-44250&lt;/del&gt;&lt;/a&gt; which explains why it was necessary for the index build setup (and &apos;startIndexBuild&apos; replication) to happen within the index builder thread.&#160;&lt;/p&gt;</comment>
                            <comment id="5417180" author="josef.ahmad" created="Thu, 11 May 2023 10:12:59 +0000"  >&lt;p&gt;Proposing resolving this bug as part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77025&quot; title=&quot;Command application conflicting with index build should wait for its completion (partial revert of SERVER-61481)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77025&quot;&gt;&lt;del&gt;SERVER-77025&lt;/del&gt;&lt;/a&gt;, which reverts the code that introduces the bug in the first place. This is going to be less risky to backport to 7.0 than the longer-term improvement described in this ticket &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-74953&quot; title=&quot;Explore avoiding stepdowns during the early phases of index build setup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-74953&quot;&gt;&lt;del&gt;SERVER-74953&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="5416985" author="josef.ahmad" created="Thu, 11 May 2023 08:08:58 +0000"  >&lt;p&gt;I reproduced the issue on 6.1.0 and proved it does not reproduce by reverting &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61481&quot; title=&quot;Remove check in dropIndexes command that no index builds are in progress for the collection once kLastLTS is 6.0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61481&quot;&gt;&lt;del&gt;SERVER-61481&lt;/del&gt;&lt;/a&gt;. This bug predates the &quot;Gracefully Handle Index Build Errors&quot; project.&lt;/p&gt;</comment>
                            <comment id="5403383" author="josef.ahmad" created="Fri, 5 May 2023 11:05:23 +0000"  >&lt;p&gt;This bug may have been around since 6.1, due to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61481&quot; title=&quot;Remove check in dropIndexes command that no index builds are in progress for the collection once kLastLTS is 6.0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61481&quot;&gt;&lt;del&gt;SERVER-61481&lt;/del&gt;&lt;/a&gt;. That ticket removed the ability for &lt;a href=&quot;https://github.com/10gen/mongo/blob/r6.0.5/src/mongo/db/repl/oplog.cpp#L2019&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;replication to wait for an index build to complete&lt;/a&gt; before applying a DDL operation to the namespace. With that logic removed, the race described in this ticket results in an invariant failure. cc: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gregory.noma%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;gregory.noma@mongodb.com&quot;&gt;gregory.noma@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pavithra.vetriselvan%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;pavithra.vetriselvan@mongodb.com&quot;&gt;pavithra.vetriselvan@mongodb.com&lt;/a&gt;&#160;&lt;/p&gt;

&lt;p&gt;In any case, I believe the index build setup phase should ideally be atomic. Preventing an election from interleaving with the setup avoids an undesirable state where a new primary isn&apos;t aware that an index build has already started setting up.&lt;/p&gt;

&lt;p&gt;(I just attached &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=yujin.kang%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;yujin.kang@mongodb.com&quot;&gt;yujin.kang@mongodb.com&lt;/a&gt;&apos;s reproducer)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="2148681">SERVER-70127</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2369802">SERVER-78143</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="979428">SERVER-44250</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2337855">SERVER-77025</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2292759">SERVER-75059</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="448169" name="0001-SERVER-74953-reproducer.patch" size="3559" author="josef.ahmad@mongodb.com" created="Fri, 5 May 2023 10:55:38 +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>7.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 20 Mar 2023 17:45:52 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        31 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-70127'>SERVER-70127</a></s>]]></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>xgen-internal-githook</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            31 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>josef.ahmad@mongodb.com</customfieldvalue>
            <customfieldvalue>yujin.kang@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i20gmn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1tlc9:</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="6816">Execution Team 2023-03-20</customfieldvalue>
    <customfieldvalue id="6819">Execution Team 2023-04-03</customfieldvalue>
    <customfieldvalue id="6820">Execution Team 2023-04-17</customfieldvalue>
    <customfieldvalue id="7175">Execution Team 2023-05-01</customfieldvalue>
    <customfieldvalue id="7177">Execution Team 2023-05-29</customfieldvalue>
    <customfieldvalue id="7178">Execution Team 2023-06-12</customfieldvalue>
    <customfieldvalue id="7534">Execution EMEA Team 2023-06-26</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|i202rz:</customfieldvalue>

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