<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:01:08 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-2771] Background index builds on replica set secondaries</title>
                <link>https://jira.mongodb.org/browse/SERVER-2771</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;At present, index builds on replica set secondaries are always performed in the foreground, and so are blocking.  So under normal circumstances, all ordinary secondaries (i.e., ones without slavedelay) will start building an index at about the same time, and so all of them will block together.&lt;/p&gt;</description>
                <environment></environment>
        <key id="15135">SERVER-2771</key>
            <summary>Background index builds on replica set secondaries</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="9">Done</resolution>
                                        <assignee username="milkie@mongodb.com">Eric Milkie</assignee>
                                    <reporter username="richard.kreuter">Richard Kreuter</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Mar 2011 15:37:43 +0000</created>
                <updated>Fri, 18 Mar 2016 22:24:38 +0000</updated>
                            <resolved>Wed, 1 May 2013 14:50:13 +0000</resolved>
                                                    <fixVersion>2.5.0</fixVersion>
                                    <component>Replication</component>
                                        <votes>27</votes>
                                    <watches>42</watches>
                                                                                                                <comments>
                            <comment id="301017" author="milkie" created="Thu, 28 Mar 2013 18:59:54 +0000"  >&lt;p&gt;The fixVersion field, version 2.5.0, is the current target for this.  We have one more thing to iron out before releasing this feature.&lt;/p&gt;</comment>
                            <comment id="300919" author="colinhowe" created="Thu, 28 Mar 2013 17:25:02 +0000"  >&lt;p&gt;Could we get an update on what is happening here? Some of the comments indicate that this was fixed in 2.2, some say 2.4 and then the status says 2.5.&lt;/p&gt;

&lt;p&gt;We just got bitten by this (again) after thinking that it was fixed 2.2.3...&lt;/p&gt;

&lt;p&gt;Pulling things out of replica sets to add indices really isn&apos;t a viable option. At least not for something that claims to make scaling easy with things like sharding support.&lt;/p&gt;</comment>
                            <comment id="249720" author="auto" created="Fri, 25 Jan 2013 16:53:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-01-25T16:52:45Z&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; --noIndexBuildRetry does not take a param&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/7a8fdfc75c26efc9aa4b3849587ef0995ffd9a36&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/7a8fdfc75c26efc9aa4b3849587ef0995ffd9a36&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="236441" author="colinhowe" created="Thu, 10 Jan 2013 19:49:40 +0000"  >&lt;p&gt;We just got hit by this... all our slaves stopped responding to queries and our clients just hung (no timeouts). Looking forward to seeing a fix!&lt;/p&gt;</comment>
                            <comment id="229165" author="auto" created="Wed, 2 Jan 2013 16:49:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-01-02T15:41:44Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Revert command handling&lt;/p&gt;

&lt;p&gt;This reverts commit e733331c7edb8871ba2dc58f20fbd2f40bf3adda.&lt;br/&gt;
This reverts commit ccf86a0fdbe7f9c9a45e8fad0410a7eef777fea2.&lt;br/&gt;
This reverts commit 7962e49b40c2bf344187df4c6fdd857c2255d759.&lt;br/&gt;
This reverts commit c5e5e6b9c0d9609234afd1390984d08f6055801b.&lt;br/&gt;
This reverts commit 325ec6e4d66dfdc075b47a804314eec8f7ea3eb2.&lt;br/&gt;
This reverts commit 283fc0d291c196232cebc8b964178037aa71f943.&lt;br/&gt;
This reverts commit 2f21426abe2d75487c91fb361154261969d303cd.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e04a7396ea753ea6dbff89028c11ed689868d707&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e04a7396ea753ea6dbff89028c11ed689868d707&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="226309" author="auto" created="Fri, 28 Dec 2012 20:12:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-28T20:05:56Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Test fixes&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e733331c7edb8871ba2dc58f20fbd2f40bf3adda&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e733331c7edb8871ba2dc58f20fbd2f40bf3adda&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="224956" author="auto" created="Thu, 27 Dec 2012 02:24:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-27T02:23:22Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Fix compact index kill criteria&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/7962e49b40c2bf344187df4c6fdd857c2255d759&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/7962e49b40c2bf344187df4c6fdd857c2255d759&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="224955" author="auto" created="Thu, 27 Dec 2012 02:24:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-27T01:42:47Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Fix test to handle other tests not cleaning up&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c5e5e6b9c0d9609234afd1390984d08f6055801b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c5e5e6b9c0d9609234afd1390984d08f6055801b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="224921" author="auto" created="Thu, 27 Dec 2012 01:06:41 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-27T00:59:22Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Use multiplatform sleep function&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/325ec6e4d66dfdc075b47a804314eec8f7ea3eb2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/325ec6e4d66dfdc075b47a804314eec8f7ea3eb2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="224920" author="auto" created="Thu, 27 Dec 2012 01:06:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-27T00:53:37Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Make foreground indexes not create a client&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/283fc0d291c196232cebc8b964178037aa71f943&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/283fc0d291c196232cebc8b964178037aa71f943&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="224824" author="auto" created="Wed, 26 Dec 2012 22:08:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-26T21:56:49Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Command handling&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2f21426abe2d75487c91fb361154261969d303cd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2f21426abe2d75487c91fb361154261969d303cd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="217378" author="auto" created="Mon, 17 Dec 2012 16:40:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-17T16:39:26Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Add debugging to test&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/41cce287ffad7ea0c04facdd0986631bade7d027&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/41cce287ffad7ea0c04facdd0986631bade7d027&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="214278" author="auto" created="Thu, 13 Dec 2012 19:44:11 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-13T19:36:27Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Multiple index builds&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2812b757dd25de5ca22c3c84135f3c654ffcb928&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2812b757dd25de5ca22c3c84135f3c654ffcb928&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="186700" author="auto" created="Mon, 12 Nov 2012 17:00:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-11-12T16:58:14Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Fix tests that use addIndex&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d9df6423f805b5cd1dc7717b62a13aae9ce3778a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d9df6423f805b5cd1dc7717b62a13aae9ce3778a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="186699" author="auto" created="Mon, 12 Nov 2012 17:00:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-11-12T15:19:43Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Retry index builds on startup&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ab1bceba74845666aaad957cab256cadf2a0c8de&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ab1bceba74845666aaad957cab256cadf2a0c8de&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="186686" author="auto" created="Mon, 12 Nov 2012 16:50:31 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-11-12T16:50:12Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Retry index builds on startup&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit ab9ff1d3ecc7163fc93188efd997bbacd8fe7406.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3abcc53d43145bcda52016c753e10ff139d41e4d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3abcc53d43145bcda52016c753e10ff139d41e4d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="186632" author="auto" created="Mon, 12 Nov 2012 16:09:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-11-12T15:19:43Z&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;, u&apos;name&apos;: u&apos;Kristina&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; Retry index builds on startup&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ab9ff1d3ecc7163fc93188efd997bbacd8fe7406&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ab9ff1d3ecc7163fc93188efd997bbacd8fe7406&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="176615" author="kristina" created="Thu, 18 Oct 2012 14:29:11 +0000"  >&lt;p&gt;Probably not, as there is a workaround (&lt;a href=&quot;http://docs.mongodb.org/manual/administration/indexes/#index-building-replica-sets&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/administration/indexes/#index-building-replica-sets&lt;/a&gt;, as you mentioned) and we&apos;d like to concentrate on getting this totally done for 2.4.&lt;/p&gt;</comment>
                            <comment id="176363" author="adamaflynn" created="Wed, 17 Oct 2012 22:47:35 +0000"  >&lt;p&gt;I&apos;d second Nathan&apos;s suggestion of adding an option to put the secondary into recovery state in this case as short-term solution to this problem since the fix didn&apos;t make it into 2.2. For any index build longer than a few seconds, I think killing the pending queries by going into recovery mode is a good trade-off for the extra operational overhead of doing what the docs propose currently or doing a replica set reconfig to go to hidden and back. Any chance of getting a change like that into 2.2.x while we wait for the secondary background indexing in 2.4?&lt;/p&gt;</comment>
                            <comment id="173523" author="auto" created="Wed, 10 Oct 2012 20:31:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-10T13:18:34-07:00&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; add synchronous kill functionality for background indexing support&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/800eea522786a5a80cec62a6eafc382b3bc377bf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/800eea522786a5a80cec62a6eafc382b3bc377bf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="173522" author="auto" created="Wed, 10 Oct 2012 20:31:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-09T10:24:41-07:00&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt; preliminary code cleanup; no functional change&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/7922e03d36d059a6602541d83b6a26224e6178dd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/7922e03d36d059a6602541d83b6a26224e6178dd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="160705" author="milkie" created="Wed, 5 Sep 2012 17:32:45 +0000"  >&lt;p&gt;Implementation will proceed as per new technical spec.  This will affect all background index builds (not just on secondaries).&lt;/p&gt;</comment>
                            <comment id="128979" author="schwerin" created="Fri, 8 Jun 2012 21:03:31 +0000"  >&lt;p&gt;Correct handling of background operations on secondaries is going to require a more thorough examination of the concurrency model.&lt;/p&gt;</comment>
                            <comment id="86282" author="scotthernandez" created="Tue, 7 Feb 2012 22:16:17 +0000"  >&lt;p&gt;On a unique, background, dropDups build we should do this synchronously since the order of the drops must be deterministic so replication isn&apos;t broken.&lt;/p&gt;</comment>
                            <comment id="66004" author="kristina" created="Thu, 10 Nov 2011 20:50:33 +0000"  >&lt;p&gt;Index builds will now happen in the background on secondaries if they happen in the background on the primary.  This means that reads can continue while the index builds.  However, replication will block until the index build is complete.&lt;/p&gt;

&lt;p&gt;Please see &lt;a href=&quot;http://www.mongodb.org/display/DOCS/Building+indexes+with+replica+sets#Buildingindexeswithreplicasets-Version2.1.0andlater&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Building+indexes+with+replica+sets#Buildingindexeswithreplicasets-Version2.1.0andlater&lt;/a&gt; for details.&lt;/p&gt;</comment>
                            <comment id="65797" author="auto" created="Wed, 9 Nov 2011 23:49:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;kchodorow&apos;, u&apos;name&apos;: u&apos;Kristina&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;}
&lt;p&gt;Message: Allow background indexes while in secondary state &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2771&quot; title=&quot;Background index builds on replica set secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2771&quot;&gt;&lt;del&gt;SERVER-2771&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/72dcc0b296306fc432f52ada8eedf4814c791b68&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/72dcc0b296306fc432f52ada8eedf4814c791b68&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="63708" author="redbeard0531" created="Mon, 31 Oct 2011 15:58:09 +0000"  >&lt;p&gt;Actually, I think we &lt;b&gt;do&lt;/b&gt; want it blocking replication at least at first so that the getLastError(&lt;/p&gt;
{w:&apos;all&apos;}
&lt;p&gt;) semantics can be relied on to wait until the index is built on all nodes. This will allow the slave to fall behind, but this is a current issue with building in forground so at least it isn&apos;t a regression (other than being slower so increased likely hood of falling out of sync).&lt;/p&gt;

&lt;p&gt;Since we know there will be no other writes to the slave while the index is building would it be possible to do an optimized background build, or maybe even a foreground build that yields or fakes it by using a read lock?&lt;/p&gt;</comment>
                            <comment id="63626" author="dwight_10gen" created="Mon, 31 Oct 2011 00:56:57 +0000"  >&lt;p&gt;another case to analyze is that well into the bg create on the primary, a killOp stops the operation.  as it were likely already placed in oplog, that would be an issue.&lt;/p&gt;</comment>
                            <comment id="63583" author="nacuff@igodigital.com" created="Sun, 30 Oct 2011 17:58:15 +0000"  >&lt;p&gt;An index build that takes longer than a couple of seconds is worse.&lt;/p&gt;

&lt;p&gt;Sounds like it&apos;s not going to be an issue though, and that&apos;s great.&lt;/p&gt;</comment>
                            <comment id="63471" author="eliot" created="Sat, 29 Oct 2011 04:32:41 +0000"  >&lt;p&gt;Nathan - that could be bad if people are querying.&lt;br/&gt;
This will be fixed for 2.2 so the index can be done in the background like on the primary.&lt;/p&gt;</comment>
                            <comment id="63382" author="nacuff@igodigital.com" created="Fri, 28 Oct 2011 18:24:48 +0000"  >&lt;p&gt;Would it be possible to have the secondary go into a RECOVERING state, like it does when compacting?  This would let you build indexes in a pinch without sprinkling rs.reconfig everywhere.  The current behavior is much worse.&lt;/p&gt;</comment>
                            <comment id="45561" author="jeff.yemin@mtvstaff.com" created="Mon, 1 Aug 2011 13:18:56 +0000"  >&lt;p&gt;Can someone explain why the master can do background indexing but secondaries can&apos;t?  Why the need to make a secondary hidden just to build an index?&lt;/p&gt;</comment>
                            <comment id="45180" author="dwight_10gen" created="Fri, 29 Jul 2011 00:21:06 +0000"  >&lt;p&gt;one workaround would be to reconfigure with the secondary member having hidden : true, then create the index, background on primary and foreground on secondary but secondary is then effectively offline for clients.  then afterwards go back to original replica set configuration.&lt;/p&gt;

&lt;p&gt;one detail here is that after reconf to hidden the secondary mongod probably needs to be restarted to make it drop existing client connections. &lt;/p&gt;</comment>
                            <comment id="45179" author="dwight_10gen" created="Fri, 29 Jul 2011 00:17:58 +0000"  >&lt;p&gt;nuances:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;first the caller to background index doesn&apos;t return until that finishes, even though other things do continue.  so if done in the initial sync thread it will likely stop until built even though other readers can keep going.&lt;/li&gt;
	&lt;li&gt;if there are unique key constraints, will the behavior be nondeterministic relative to the primary?  i think so?  one incremental step would be to do background for non-unique indexes as a start&lt;/li&gt;
	&lt;li&gt;what else that i&apos;m forgetting?&lt;/li&gt;
&lt;/ul&gt;

</comment>
                            <comment id="26060" author="robfan" created="Thu, 17 Mar 2011 06:29:20 +0000"  >&lt;p&gt;Gotcha, thanks Eliot.  Doubly for your late-nightedness JIRA mastery &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;  Take care, Rob&lt;/p&gt;</comment>
                            <comment id="26059" author="eliot" created="Thu, 17 Mar 2011 06:24:03 +0000"  >&lt;p&gt;@robert - this is basically a new feature, so highly unlikely to be backported to 1.8.&lt;br/&gt;
2.0 should be out in late q2&lt;/p&gt;</comment>
                            <comment id="26058" author="robfan" created="Thu, 17 Mar 2011 06:20:21 +0000"  >&lt;p&gt;Would love to see this on 1.8.x if at all possible.  We create several new collections on a daily basis and add about 5 indices per collection created.  With our current size (~1TB) adding an index after-the-fact takes about 15 hours and we can&apos;t afford to have the secondaries out of commission for so long.&lt;/p&gt;</comment>
                            <comment id="26016" author="richard@10gen.com" created="Wed, 16 Mar 2011 17:03:44 +0000"  >&lt;p&gt;Is the issue that because only one background index build can happen at a time, if the secondary started a background index build and encounters a subsequent background build op in the oplog, it&apos;d have to either pause replication or do something that amounts to enqueuing the second index build for later processing?&lt;/p&gt;

&lt;p&gt;If that&apos;s the only issue, then having a persisted queue of to-be-constructed indexes and a background thread that processes the queue could also mean that createIndex wouldn&apos;t have to fail while an index was under construction even in non-RS deployments.&lt;/p&gt;</comment>
                            <comment id="26013" author="dwight_10gen" created="Wed, 16 Mar 2011 16:10:59 +0000"  >&lt;p&gt;            if( background &amp;amp;&amp;amp; cc().isSyncThread() ) &lt;/p&gt;
{
                /* don&apos;t do background indexing on slaves.  there are nuances.  this could be added later
                   but requires more code.
                   */
                log() &amp;lt;&amp;lt; &quot;info: indexing in foreground on this replica; was a background index build on the primary&quot; &amp;lt;&amp;lt; endl;
                background = false;
            }</comment>
                            <comment id="26012" author="dwight_10gen" created="Wed, 16 Mar 2011 16:08:51 +0000"  >&lt;p&gt;there was a reason why it was incorrect to do the background build on the secondaries.&lt;/p&gt;

&lt;p&gt;we should fix it.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="73024">SERVER-9452</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="14345">PYTHON-202</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="29480">SERVER-4820</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="12851">SERVER-1645</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                                                <inwardlinks description="has to be done after">
                                        <issuelink>
            <issuekey id="65021">SERVER-8536</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="14243">SERVER-2374</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="28148">SERVER-4662</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="72628">SERVER-9421</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="47975">SERVER-6836</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="48450">SERVER-6883</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="29480">SERVER-4820</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="60524">SERVER-8044</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="85058">SERVER-10460</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="94499">SERVER-11219</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="111040">SERVER-12727</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="150285">SERVER-14746</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="44625">DOCS-342</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="56033">DOCS-739</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>40.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 16 Mar 2011 15:45:51 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 46 weeks, 6 days 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-9452'>SERVER-9452</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>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>andrew.ryder@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 46 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>adamaflynn</customfieldvalue>
            <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>colinhowe</customfieldvalue>
            <customfieldvalue>dwight@mongodb.com</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>jeff.yemin@mtvstaff.com</customfieldvalue>
            <customfieldvalue>kristina</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>nacuff@igodigital.com</customfieldvalue>
            <customfieldvalue>richard.kreuter</customfieldvalue>
            <customfieldvalue>robfan</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp3hb:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5703</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_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10154"><![CDATA[Complete]]></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|hsswj3:</customfieldvalue>

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