<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:51:25 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-83163] Replace RecordData with BSONObj</title>
                <link>https://jira.mongodb.org/browse/SERVER-83163</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Record stores used to store non-bson data back in the MMAPv1 days. Admittedly, it was internal to the MMAPv1 implementation, but it was still using the public APIs to store its btree buckets in an MmapV1RecordStore. That code is of course long gone, but the idea the record stores could store anything other than BSON remains by way of the RecordData type. I believe we now only store BSON in RecordStores, with the possible exception of some old unit tests which should be easy to convert to storing BSON.&lt;/p&gt;

&lt;p&gt;I think this would be a nice cleanup of the storage engine concepts because it makes it clear that a RecordStore is logically a &lt;tt&gt;map&amp;lt;RecordId, BSON&amp;gt;&lt;/tt&gt; and not some arbitrary blob of unknown format. Of course, this may not be ideal if we are planning to put non-bson data in a RecordStore (at the boundary of the storage engine API). But even then, it may still be a good idea to do this, to force us to use a separate type (possibly with a common base) for data structures that map from &lt;tt&gt;RecordIds&lt;/tt&gt; to other formats.&lt;/p&gt;

&lt;p&gt;While IMO it is worth doing this for the conceptual clarity alone, there are at least a few practical benefits I can see that this unlocks:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;BSONObj is already set up to have owned views to slices of &lt;tt&gt;ConstSharedBuffers&lt;/tt&gt; while RecordData isn&apos;t (not that it would be &lt;em&gt;too&lt;/em&gt; hard to make it so). While currently we never take advantage of the owned data in the storage engine and always copy, we&apos;ve identified a few places where that would be benefit from doing so.&lt;/li&gt;
	&lt;li&gt;RecordData probably should use &lt;tt&gt;ConstSharedBuffer&lt;/tt&gt; rather than (mutable) &lt;tt&gt;SharedBuffer&lt;/tt&gt; since the recievers of those should never modify them (at least without first checking &lt;tt&gt;isShared()&lt;/tt&gt;.)&lt;/li&gt;
	&lt;li&gt;Storage engines should be able to take advantage of the fact that they know that the values will be in BSON format. For example, they could either omit the size and trailing 0 byte, or (more likely) they could omit thier own storage of the size and just use the first 4 bytes of the BSON. Additionally, they could use BSON-specific compression of values without first validating that the data was actually bson.&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="2498107">SERVER-83163</key>
            <summary>Replace RecordData with BSONObj</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="mathias@mongodb.com">Mathias Stearn</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Nov 2023 12:32:31 +0000</created>
                <updated>Thu, 16 Nov 2023 16:36:48 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="5883277" author="louis.williams" created="Wed, 15 Nov 2023 21:06:28 +0000"  >&lt;p&gt;Query is using RecordStores for &lt;a href=&quot;https://github.com/mongodb/mongo/blob/82fbe7a468ef948d44166ff9a9056ae705a51243/src/mongo/db/exec/sbe/util/spilling.cpp#L140C29-L140C29&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;spilling arbitrary binary data&lt;/a&gt;. So this would not be possible unless we considered creating a new interface just for BSON storage.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 15 Nov 2023 21:06:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 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>steven.vannelli@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 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>
            <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|i304jb:</customfieldvalue>

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

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_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|i2zqon:</customfieldvalue>

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