<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:02:43 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-43266] Refactor SortedDataInterface to competently work with KeyString</title>
                <link>https://jira.mongodb.org/browse/SERVER-43266</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In order to make index builds faster, we made interface changes to SortedDataInterface to accept KeyStrings (see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41719&quot; title=&quot;Overload SortedDataInterface::insert and unindex to accept KeyStrings&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41719&quot;&gt;&lt;del&gt;SERVER-41719&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41720&quot; title=&quot;Overload SortedDataInterface::Cursor::seek and seekExact to accept KeyStrings&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41720&quot;&gt;&lt;del&gt;SERVER-41720&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;This introduced some consequentially confusing API problems, which are summarized below. This ticket is an attempt to capture those issues:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/ca3b9f722c5d90abbc114395815cc6cc16beaba1/src/mongo/db/storage/sorted_data_interface.h#L93-L94&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;insert()&lt;/a&gt; takes a KeyString which is required to have a RecordId appended.
	&lt;ul&gt;
		&lt;li&gt;This string is not necessarily how the index implementation stores the entry. Most indexes use a KeyString+RecordId key. The &quot;_id&quot; index, however, stores the RecordId as the value, not in the key of the index entry, and strips away the RecordId from the KeyString for the key.&lt;/li&gt;
		&lt;li&gt;Ideally, insert would take two arguments, a key and value, but accepting a single parameter was chosen as an optimization to avoid making extra copies of the index key just to append a RecordId in the common case&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/ca3b9f722c5d90abbc114395815cc6cc16beaba1/src/mongo/db/storage/sorted_data_interface.h#L309&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;seekExact()&lt;/a&gt; takes a KeyString which is required to &lt;b&gt;not&lt;/b&gt; have a RecordId appended.
	&lt;ul&gt;
		&lt;li&gt;This is confusing because it contradicts the API requirement of the insert() function, which is the opposite. In fact, to &quot;seek exactly&quot; should really return nothing for indexes that store the RecordId in the key, because it would never be possible to pass in a KeyString query with a RecordId, per the API definition.&lt;/li&gt;
		&lt;li&gt;seekExact today really does &quot;seek to a prefix&quot;, which isn&apos;t much different than seek, and could be a candidate for removal.&lt;/li&gt;
		&lt;li&gt;This is mostly captured by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43176&quot; title=&quot;Restrict SortedDataInterface::seekExact to only return exact KeyString matches&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43176&quot;&gt;&lt;del&gt;SERVER-43176&lt;/del&gt;&lt;/a&gt;, which attempts to restrict seekExact to the _id index.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;Callers are now responsible for understanding how to construct KeyStrings for inserting and querying, both versions are different and in some cases neither represent how the data is actually stored.
	&lt;ul&gt;
		&lt;li&gt;For example, we construct KeyStrings with discriminators to pass into seek, but discriminators are not stored in the storage engine. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43059&quot; title=&quot;Make read and write versions for KeyString&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43059&quot;&gt;SERVER-43059&lt;/a&gt; captures this problem, mostly.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="923479">SERVER-43266</key>
            <summary>Refactor SortedDataInterface to competently work with KeyString</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-execution">Backlog - Storage Execution Team</assignee>
                                    <reporter username="louis.williams@mongodb.com">Louis Williams</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Sep 2019 15:02:09 +0000</created>
                <updated>Tue, 6 Dec 2022 02:48:22 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                        <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25136"><![CDATA[Storage Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 22 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>
                            4 years, 22 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-execution</customfieldvalue>
            <customfieldvalue>louis.williams@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvpn87:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr24yf:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3212">Execution Team 2019-10-07</customfieldvalue>

                        </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|hvp9hj:</customfieldvalue>

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