<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:36:12 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-55344] Propagate whether we are inserting multikeyMetadataKeys down to the SortedDataInterface layer</title>
                <link>https://jira.mongodb.org/browse/SERVER-55344</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;multikeyMetadataKeys are the only case right now where at steady-state, we expect different rows to insert conflicting keys into a WiredTigerIndexStandard. This works* because we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1da484f78acb20622255bc97617ee5c0dd1315f7/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp#L1712-L1715&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ignore WT_DUPLICATE_KEY&lt;/a&gt;. But it also prevents us from doing blind updates with &lt;tt&gt;&quot;overwrite=true&quot;&lt;/tt&gt;, because that converts the &lt;tt&gt;WT_DUPLICATE_KEY&lt;/tt&gt; error into a &lt;tt&gt;WT_ROLLBACK&lt;/tt&gt;/&lt;tt&gt;WriteConflictException&lt;/tt&gt; if two concurrent writes try to write the same metadata key, which is disastrous for perf. We have strong indications that LSM will be needed for good perf with wildcard indexes (which are also the only kinds that generate multikeyMetadataKeys), and LSM trees need &lt;tt&gt;&quot;overwrite=true&quot;&lt;/tt&gt; for good perf. &lt;/p&gt;

&lt;p&gt;There are a few options here, including:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;do a search/search_near prior to the insert for these keys and in the highly likely case that they are found, do not try to insert&lt;/li&gt;
	&lt;li&gt;do the insert for these keys with &lt;tt&gt;&quot;overwrite=false&quot;&lt;/tt&gt; even when we would normally insert with &lt;tt&gt;&quot;overwrite=true&quot;&lt;/tt&gt;. Because each index will (generally) only have up to a few hundred of these keys regardless of their size, and because they are all clustered together in the tree, the downsides of &lt;tt&gt;&quot;overwrite=false&quot;&lt;/tt&gt; with LSM don&apos;t apply as much.&lt;/li&gt;
	&lt;li&gt;store these keys in a separate side btree tree rather than using LSM. You could probably even have one table per db, although that might complicate some operations.&lt;/li&gt;
	&lt;li&gt;cache the set of multikeyMetadataKeys for each index, and only send the new ones down to the SDI. This requires some careful caching logic to be correct WRT transactions, snapshots, and rollback, but since the set of keys is likely to very rarely change, it may be worth it.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;&amp;#42; Well it currently has some race conditions with mongo&apos;s implicit WriteUnitOfWork transactions due to &lt;a href=&quot;https://jira.mongodb.org/browse/WT-7310&quot; title=&quot;dupekey error on uncommited write should return WT_ROLLBACK not WT_DUPLICATE_KEY&quot; class=&quot;issue-link&quot; data-issue-key=&quot;WT-7310&quot;&gt;WT-7310&lt;/a&gt;. Also, that comment should probably be updated to mention this case since it is misleading as written now.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1653863">SERVER-55344</key>
            <summary>Propagate whether we are inserting multikeyMetadataKeys down to the SortedDataInterface layer</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>Fri, 19 Mar 2021 14:26:50 +0000</created>
                <updated>Tue, 6 Dec 2022 01:30:09 +0000</updated>
                                                                            <component>Index Maintenance</component>
                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1652640">WT-7310</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>0.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>
                                        2 years, 46 weeks, 5 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>false</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>
                            2 years, 46 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-execution</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|hz0bfz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr25c7:</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|hyzxp3:</customfieldvalue>

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