<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:35:56 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-14772] Create a way to add an empty sparse index, skipping iteration of the collection</title>
                <link>https://jira.mongodb.org/browse/SERVER-14772</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I&apos;m currently adding some sparse indexes to big collections for which I&apos;m certain the indexes matches no document.&lt;br/&gt;
Creation of the index takes forever (because it iterates over every single document of the collections, blocking any operation meanwhile) while it could take just a few ms.&lt;/p&gt;

&lt;p&gt;Maybe something like {{ &lt;/p&gt;
{ sparse: true,skipSparseIndexCreation: true }
&lt;p&gt; }}&lt;br/&gt;
Also, this is probably trivial to do.&lt;/p&gt;</description>
                <environment></environment>
        <key id="150569">SERVER-14772</key>
            <summary>Create a way to add an empty sparse index, skipping iteration of the collection</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="3">Duplicate</resolution>
                                        <assignee username="backlog-server-query">Backlog - Query Team</assignee>
                                    <reporter username="tubededentifrice">Vincent</reporter>
                        <labels>
                    </labels>
                <created>Sat, 2 Aug 2014 02:56:35 +0000</created>
                <updated>Tue, 6 Dec 2022 05:03:17 +0000</updated>
                            <resolved>Thu, 22 Feb 2018 20:20:59 +0000</resolved>
                                                                    <component>Index Maintenance</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="683041" author="tubededentifrice" created="Wed, 6 Aug 2014 18:34:34 +0000"  >&lt;p&gt;Well, those features might never come up (or at least not in the foreseeable future... they were reported 4 years/2 years ago and are still unscheduled), so it would be nice to provide users this at their own risks.&lt;br/&gt;
To give you my honest opinion on MongoDB, not really related on this topic: MongoDB is soooo slowwww as soon as it has to deal with anything on big collections, when, I believe, a very limited number of features could significantly improve this speed (heard about TokuMX? Divide disk usage by 10 =&amp;gt; you can now get SSD in your servers ; Tokenizing field names would reduce by 2 or so disk/memory usage, etc.). You have a new CEO, I hope he will focus efforts on this, because that&apos;s what people want and that&apos;s why people use NoSQL databases mainly: dealing with big data.&lt;/p&gt;</comment>
                            <comment id="682969" author="thomasr" created="Wed, 6 Aug 2014 17:56:38 +0000"  >&lt;p&gt;Hi Vincent,&lt;/p&gt;

&lt;p&gt;We can&apos;t add features to the product that would in many cases lead to inconsistent replica set members, even if properly documented. This would also make diagnosing indexing issues very hard, as one couldn&apos;t tell which documents should be in the index and which ones shouldn&apos;t.&lt;/p&gt;

&lt;p&gt;It&apos;s unlikely that we&apos;re going to implement the feature as proposed at this stage. The situation would change once MongoDB supports some form of schema validation (see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3536&quot; title=&quot;templates for schemas&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3536&quot;&gt;&lt;del&gt;SERVER-3536&lt;/del&gt;&lt;/a&gt;), at which point we may be looking at shortcuts to create sparse indexes on non-existing fields.&lt;/p&gt;

&lt;p&gt;Related to the issue you describe, we are going to focus on improving performance and reducing impact of regular index builds, see for example &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-676&quot; title=&quot;use multiple cores for index sort-phase&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-676&quot;&gt;&lt;del&gt;SERVER-676&lt;/del&gt;&lt;/a&gt; or &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6883&quot; title=&quot;index creation on secondaries need not block readers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6883&quot;&gt;&lt;del&gt;SERVER-6883&lt;/del&gt;&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;If background indexes are not an option for you then you may want to build indexes in a rolling fashion on your replica set to maintain availability, as described in &lt;a href=&quot;http://docs.mongodb.org/manual/tutorial/build-indexes-on-replica-sets/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Build Indexes on Replica Sets&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                            <comment id="681157" author="tubededentifrice" created="Mon, 4 Aug 2014 22:38:39 +0000"  >&lt;p&gt;Hi Thomas,&lt;/p&gt;

&lt;p&gt;I&apos;m aware of this potential risk, but the users using that command should understand them and deal with them. In my case I was 100% sure that no document contained the indexed (new) field. And probably other users faces this issue.&lt;br/&gt;
The solution might be to make this command &quot;private&quot;, ie &quot;_skipSparseIndexCreation&quot; or so, documented with proper warnings, so only users with enough knowledge would use it.&lt;br/&gt;
I don&apos;t like background indexes because AFAIK they take (even) more (memory) space and more time to build/less efficient.&lt;/p&gt;</comment>
                            <comment id="681091" author="thomasr" created="Mon, 4 Aug 2014 21:36:49 +0000"  >&lt;p&gt;Hi Vincent, &lt;/p&gt;

&lt;p&gt;This could lead to an incomplete index containing only a subset of the documents that it should index. Additionally, secondary nodes that resync from scratch may build the index at a different time and contain a different set of documents. Depending on which node you query or which node is primary, you would get different results. This is not a desirable property of replica sets.&lt;/p&gt;

&lt;p&gt;Have you tried building the index in the background? This way the impact to the system should be less severe and non-blocking.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="14232">SERVER-2366</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 4 Aug 2014 21:36:49 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 28 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 28 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>thomas.rueckstiess@mongodb.com</customfieldvalue>
            <customfieldvalue>tubededentifrice</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlqjr:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>130623</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|hsgra7:</customfieldvalue>

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