<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:35:20 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-14584] BtreeLogic::Builder generates an invalid Btree</title>
                <link>https://jira.mongodb.org/browse/SERVER-14584</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The btree it builds has a root node with no nextChild. This means it has N keys and N children rather than N+1.&lt;/p&gt;

&lt;p&gt;This only effects foreground index builds with enough data to have a multi-layer btree.&lt;/p&gt;

&lt;p&gt;I verified this has been the behavior since at least 2.2 which is the oldest branch I can build locally.&lt;/p&gt;</description>
                <environment></environment>
        <key id="147554">SERVER-14584</key>
            <summary>BtreeLogic::Builder generates an invalid Btree</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="mathias@mongodb.com">Mathias Stearn</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Jul 2014 20:45:49 +0000</created>
                <updated>Tue, 3 Feb 2015 16:20:09 +0000</updated>
                            <resolved>Mon, 28 Jul 2014 16:03:37 +0000</resolved>
                                    <version>2.2.7</version>
                                    <fixVersion>2.7.5</fixVersion>
                                    <component>Index Maintenance</component>
                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="673672" author="xgen-internal-githook" created="Mon, 28 Jul 2014 16:00:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-14584&quot; title=&quot;BtreeLogic::Builder generates an invalid Btree&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-14584&quot;&gt;&lt;del&gt;SERVER-14584&lt;/del&gt;&lt;/a&gt; Clean up BtreeLogic::pushBack/_pushBack naming&lt;/p&gt;

&lt;p&gt;There are no functional changes, other than the &lt;a href=&quot;file:line&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;file:line&lt;/a&gt; that would be&lt;br/&gt;
printed on invariant failures.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/94880490ed1d138be2a6547726ef598511f8311a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/94880490ed1d138be2a6547726ef598511f8311a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="673671" author="xgen-internal-githook" created="Mon, 28 Jul 2014 16:00:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-14584&quot; title=&quot;BtreeLogic::Builder generates an invalid Btree&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-14584&quot;&gt;&lt;del&gt;SERVER-14584&lt;/del&gt;&lt;/a&gt; Use correct algorithm in BtreeLogic::Builder&lt;/p&gt;

&lt;p&gt;Both algorithms cover phases 2 and 3 of forground index building. Importantly&lt;br/&gt;
they both take as input pre-sorted data that has already been extracted from&lt;br/&gt;
the raw documents (phase 1).&lt;/p&gt;

&lt;p&gt;OLD ALGORITHM:&lt;br/&gt;
  Phase 2:&lt;br/&gt;
    Add all keys to buckets. When a bucket gets full, create a new bucket and&lt;br/&gt;
    link it as the original bucket&apos;s parent pointer. At the end of the stage&lt;br/&gt;
    we have a linked-list of leaf nodes starting as the left-most corner.&lt;/p&gt;

&lt;p&gt;  Phase 3:&lt;br/&gt;
    Walk the linked produced by phase 2, and build the layer above the leaves.&lt;br/&gt;
    With each bucket, except for the last (right-most), pop* its highest key&lt;br/&gt;
    and add it to the bucket that will be it&apos;s parent. If the current parent&lt;br/&gt;
    bucket is full a new one is added to higher-layer linked list as in&lt;br/&gt;
    phase 1. Phase 3 is repeated on the new higher-layer linked list until you&lt;br/&gt;
    get a layer with a single bucket which is marked as the root of the tree.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Importantly, popping a key is what sets the nextChild pointer on a&lt;br/&gt;
    bucket.  It is set to what used to be the prevChildNode of the key that is&lt;br/&gt;
    popped.  A major flaw of this algorithm is that because no key is ever&lt;br/&gt;
    popped from the root, its nextChild pointer is never filled in.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;NEW ALGORITHM:&lt;br/&gt;
  Phase 2:&lt;br/&gt;
    Add all keys to buckets. When a bucket gets full, pop the highest key&lt;br/&gt;
    (setting the nextChild pointer of the bucket to the prevChild of the&lt;br/&gt;
    popped key), add the popped key to a parent bucket, and create a new right&lt;br/&gt;
    sibling bucket to add the new key to. If the parent bucket is full, this&lt;br/&gt;
    same operation is performed on the parent and all full ancestors. If we&lt;br/&gt;
    get to the root and it is full, a new root is created above the current&lt;br/&gt;
    root. When creating a new right sibling, it is set as its parent&apos;s&lt;br/&gt;
    nextChild as all keys in the right sibling will be higher than all keys&lt;br/&gt;
    currently in the parent.&lt;/p&gt;

&lt;p&gt;  Phase 3:&lt;br/&gt;
    Does nothing. This may go away soon.&lt;/p&gt;

&lt;p&gt;Non-exhaustive list of benefits to the new algorthm:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Generates a valid btree.&lt;/li&gt;
	&lt;li&gt;Doesn&apos;t require a second pass over all of the buckets in the index. This can&lt;br/&gt;
  be significantly faster for indexes that don&apos;t fit in ram.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9b5f950603376b36eb2659ae5b8fdae2ee8714cf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9b5f950603376b36eb2659ae5b8fdae2ee8714cf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="671838" author="redbeard0531" created="Fri, 25 Jul 2014 20:54:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2732&quot; title=&quot;btreebuilder may create a bucket with a null nextLoc&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2732&quot;&gt;&lt;del&gt;SERVER-2732&lt;/del&gt;&lt;/a&gt; is the same issue.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="15074">SERVER-2732</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="52896">SERVER-7326</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10220">
                    <name>Tested</name>
                                            <outwardlinks description="tested by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 28 Jul 2014 16:00:18 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 29 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_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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 29 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlrjz:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>127725</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11861" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>User Summary</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11856"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsgspj:</customfieldvalue>

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