<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:02:16 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-43097] Improve log messaging when index builds get foregrounded because of startup recovery</title>
                <link>https://jira.mongodb.org/browse/SERVER-43097</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When startup recovery (storage and replication) encounter an unfinished background index build, they rebuild the index in the foreground. Startup blocks until all indexes in this state complete building.&lt;/p&gt;

&lt;p&gt;The logging is clear that the indexes are being built as part of recovery, but it&apos;s not clear that the &lt;tt&gt;background: true&lt;/tt&gt; flag on the index definition is explicitly being ignored.&lt;/p&gt;</description>
                <environment></environment>
        <key id="913233">SERVER-43097</key>
            <summary>Improve log messaging when index builds get foregrounded because of startup recovery</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="13201">Fixed</resolution>
                                        <assignee username="gregory.noma@mongodb.com">Gregory Noma</assignee>
                                    <reporter username="daniel.gottlieb@mongodb.com">Daniel Gottlieb</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Aug 2019 15:28:49 +0000</created>
                <updated>Sun, 29 Oct 2023 22:17:34 +0000</updated>
                            <resolved>Mon, 1 Jun 2020 14:33:02 +0000</resolved>
                                    <version>4.0.12</version>
                    <version>4.2.0</version>
                                    <fixVersion>4.0.20</fixVersion>
                    <fixVersion>4.2.8</fixVersion>
                    <fixVersion>4.4.0-rc9</fixVersion>
                    <fixVersion>4.7.0</fixVersion>
                                    <component>Diagnostics</component>
                    <component>Storage</component>
                                        <votes>1</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="3208064" author="xgen-internal-githook" created="Mon, 15 Jun 2020 14:47:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43097&quot; title=&quot;Improve log messaging when index builds get foregrounded because of startup recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43097&quot;&gt;&lt;del&gt;SERVER-43097&lt;/del&gt;&lt;/a&gt; Improve log messaging when index builds get foregrounded because of startup recovery&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d74e05232c7924e929a94301850b3408395d710f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d74e05232c7924e929a94301850b3408395d710f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3192377" author="xgen-internal-githook" created="Fri, 5 Jun 2020 14:39:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43097&quot; title=&quot;Improve log messaging when index builds get foregrounded because of startup recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43097&quot;&gt;&lt;del&gt;SERVER-43097&lt;/del&gt;&lt;/a&gt; Improve log messaging when index builds get foregrounded because of startup recovery&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3109036c252b774693128e793d6cbede7d5e420b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3109036c252b774693128e793d6cbede7d5e420b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3192266" author="xgen-internal-githook" created="Fri, 5 Jun 2020 14:24:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43097&quot; title=&quot;Improve log messaging when index builds get foregrounded because of startup recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43097&quot;&gt;&lt;del&gt;SERVER-43097&lt;/del&gt;&lt;/a&gt; Improve log messaging when index builds get foregrounded because of startup recovery&lt;/p&gt;

&lt;p&gt;(cherry picked from commit d29bb7d63843faad9f63974d89253586dff6cae5)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bb14773b9dcf953e10bf74ecfb7bc8fa45cdb497&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bb14773b9dcf953e10bf74ecfb7bc8fa45cdb497&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3148553" author="xgen-internal-githook" created="Mon, 1 Jun 2020 14:31:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43097&quot; title=&quot;Improve log messaging when index builds get foregrounded because of startup recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43097&quot;&gt;&lt;del&gt;SERVER-43097&lt;/del&gt;&lt;/a&gt; Improve log messaging when index builds get foregrounded because of startup recovery&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d29bb7d63843faad9f63974d89253586dff6cae5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d29bb7d63843faad9f63974d89253586dff6cae5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2409514" author="daniel.gottlieb@10gen.com" created="Thu, 5 Sep 2019 19:19:21 +0000"  >&lt;p&gt;I want to provide some context on why unfinished background indexes will be rebuilt in the foreground when MongoD starts up beginning in 4.0. To start, this is the lifetime of a background index build in a replica set:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;User sends a &lt;tt&gt;createIndexes&lt;/tt&gt; command to a primary.&lt;/li&gt;
	&lt;li&gt;The primary starts the index build.&lt;/li&gt;
	&lt;li&gt;The primary completes the index build.
	&lt;ol&gt;
		&lt;li&gt;On a &lt;tt&gt;w: 1&lt;/tt&gt; call, this sends a response back to the primary.&lt;/li&gt;
		&lt;li&gt;An oplog entry is created telling secondaries to start building the index.&lt;/li&gt;
		&lt;li&gt;The primary writes to its catalog declaring the index build is &quot;complete&quot;. Meaning the index data is complete and consistent with the collection.&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
	&lt;li&gt;Secondaries process the oplog entry and start their index build. Because it&apos;s background, they continue to process other oplog entries.&lt;/li&gt;
	&lt;li&gt;A secondary completes the index build. This involves a write to catalog document representing that collection.
	&lt;ul&gt;
		&lt;li&gt;However, this write is not coordinated at the replica set level. The write must make up a &quot;timestamp&quot; which tells the storage engine the relationship of that write to the &quot;ts&quot; field in its oplog entries.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;In a running, steady-state node, we have a way for choosing a valid time. At startup, this is trickier. To complicate things:&lt;/p&gt;

&lt;p&gt;The document being written to (as in, the unit of modification in the storage engine) actually captures the entire state of a collection. This write to signify an index completing can conflict with any other change to a collection&apos;s metadata such as any collations, schema validation rules, capped collections, other indexes, etc. Choosing an incorrect time can result in a rollback not returning a node to the correct state (e.g the rolling back node may disagree with other replica set members on what schema validation rules are present).&lt;/p&gt;

&lt;p&gt;The easiest way to make sure a proper time is chosen at startup is to foreground the index and use the timestamp of the oplog entry itself. We could probably find a solution that doesn&apos;t foreground the index build, but secondaries have long been limited in that additional background builds will block until the prior one completes (in many cases, leaving the server in the same position). These limitations are ones we&apos;re actively working on removing.&lt;/p&gt;</comment>
                            <comment id="2409212" author="milkie" created="Thu, 5 Sep 2019 16:35:58 +0000"  >&lt;p&gt;Note that this doesn&apos;t really affect 4.2.0 because there is no distinction between background and foreground index builds in 4.2; everything is one type of index build (the &quot;background&quot; flag is always ignored for every index build, despite its presence), and the system attempts all index builds without locking collections if it can.&lt;/p&gt;</comment>
                            <comment id="2401913" author="daniel.gottlieb@10gen.com" created="Fri, 30 Aug 2019 15:34:00 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nuno.costa&quot; class=&quot;user-hover&quot; rel=&quot;nuno.costa&quot;&gt;nuno.costa&lt;/a&gt; I&apos;m a little hesitant to remove the &lt;tt&gt;background: true&lt;/tt&gt; flag from the index definition being logged. What do you think about the following two changes:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Changing the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/9d2b269d547277bb679bceb3ab6b80b43948b030/src/mongo/db/repl/oplog.cpp#L127-L128&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;log verbosity here&lt;/a&gt; to make sure it&apos;s always logged?&lt;/li&gt;
	&lt;li&gt;Clearly stating &lt;a href=&quot;https://github.com/mongodb/mongo/blob/00e2bca5efcb74cb95b7d3824299a530a288a025/src/mongo/db/storage/storage_engine_impl.cpp#L472-L474&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;in the earlier log message&lt;/a&gt; that the index build will take place in the foreground.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="517043">SERVER-34142</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></customfieldvalue>
    <customfieldvalue key="16775"><![CDATA[v4.2]]></customfieldvalue>
    <customfieldvalue key="15640"><![CDATA[v4.0]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000fMsVvQAK]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 2 Sep 2019 13:57:54 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 34 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1726</customfieldvalue>
                        </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, 34 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>gregory.noma@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvnwyf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr54g7:</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="3877">Execution Team 2020-06-01</customfieldvalue>
    <customfieldvalue id="3937">Execution Team 2020-06-15</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|hvnj7r:</customfieldvalue>

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