<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:33:02 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-76574] Improve LRUKeyValue to avoid storing keys twice</title>
                <link>https://jira.mongodb.org/browse/SERVER-76574</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The &lt;a href=&quot;https://github.com/mongodb/mongo/blob/49395d449c33b1201fb57f4a4f2aca8278c36a5b/src/mongo/db/query/lru_key_value.h&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;LRUKeyValue&lt;/tt&gt;&lt;/a&gt; utility is in-memory key-value store which guarantees that its size will never exceed a given budget, and which keeps itself under this maximum size budget using a least-recently used (LRU) eviction policy. It is currently used as the underlying data structure for the classic engine plan cache, the SBE plan cache, and the &lt;tt&gt;TelemetryStore&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;It is a template class where the keys are of type parameter &lt;tt&gt;K&lt;/tt&gt; and the values of type parameter &lt;tt&gt;V&lt;/tt&gt;. The callers use a pointer type for &lt;tt&gt;V&lt;/tt&gt; (either a &lt;tt&gt;shared_ptr&lt;/tt&gt; or a &lt;tt&gt;unique_ptr&lt;/tt&gt; should work). In the case of the classic and SBE plan caches, &lt;tt&gt;K&lt;/tt&gt; is the plan cache key itself which can be a quite large object.&lt;/p&gt;

&lt;p&gt;The problem is that &lt;tt&gt;LRUKeyValue&lt;/tt&gt; actually stores multiple copies of each key object of type &lt;tt&gt;K&lt;/tt&gt;: once in the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/49395d449c33b1201fb57f4a4f2aca8278c36a5b/src/mongo/db/query/lru_key_value.h#L276-L278&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;list of key-value pairs&lt;/a&gt; which maintains the least-recently used ordering, and again in the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/49395d449c33b1201fb57f4a4f2aca8278c36a5b/src/mongo/db/query/lru_key_value.h#L280-L282&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;hash table&lt;/a&gt; which is used for O(1) lookup by key. This doesn&apos;t matter much if the key is a small object like an int, but in practice we are storing multiple copies of a potentially quite large object like the classic or SBE plan cache key. We should improve this to store the key just once.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2325350">SERVER-76574</key>
            <summary>Improve LRUKeyValue to avoid storing keys twice</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="13201">Fixed</resolution>
                                        <assignee username="matt.olma@mongodb.com">Matt Olma</assignee>
                                    <reporter username="david.storch@mongodb.com">David Storch</reporter>
                        <labels>
                            <label>neweng</label>
                            <label>query-director-triage</label>
                            <label>quick-tech-debt</label>
                    </labels>
                <created>Wed, 26 Apr 2023 19:27:12 +0000</created>
                <updated>Sun, 29 Oct 2023 21:22:26 +0000</updated>
                            <resolved>Thu, 1 Jun 2023 16:35:21 +0000</resolved>
                                                    <fixVersion>7.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5460630" author="david.storch" created="Tue, 30 May 2023 15:18:46 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matt.olma%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;matt.olma@mongodb.com&quot;&gt;matt.olma@mongodb.com&lt;/a&gt; this ticket can be closed now, right?&lt;/p&gt;</comment>
                            <comment id="5456599" author="xgen-internal-githook" created="Sat, 27 May 2023 04:06:43 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Matt Olma&apos;, &apos;email&apos;: &apos;matt.olma@mongodb.com&apos;, &apos;username&apos;: &apos;mattsimply&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-76574&quot; title=&quot;Improve LRUKeyValue to avoid storing keys twice&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-76574&quot;&gt;&lt;del&gt;SERVER-76574&lt;/del&gt;&lt;/a&gt;: Improve LRUKeyValue to avoid storing keys twice&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4c759df75f8f59181d0c85dfc937f225f562fb60&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4c759df75f8f59181d0c85dfc937f225f562fb60&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5394104" author="david.storch" created="Tue, 2 May 2023 14:42:06 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=steve.tarzia%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;steve.tarzia@mongodb.com&quot;&gt;steve.tarzia@mongodb.com&lt;/a&gt; did you have any specific plans to schedule this? I know that plan cache memory consumption has been problematic for customers in the past, so I think this is worth trying to schedule in the relatively near future. Same thing for related ticket &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-73649&quot; title=&quot;Improve SBE plan cache BudgetEstimator to incorporate the size of the key&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-73649&quot;&gt;&lt;del&gt;SERVER-73649&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2253899">SERVER-73649</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2253985">SERVER-73659</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2364751">SERVER-77976</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25126"><![CDATA[Query Optimization]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 15 May 2023 01:31:29 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        36 weeks, 1 day 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            36 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>matt.olma@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i26jen:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1ou6g:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7232">QO 2023-05-15</customfieldvalue>
    <customfieldvalue id="7234">QO 2023-05-29</customfieldvalue>
    <customfieldvalue id="7235">QO 2023-06-12</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|i265jz:</customfieldvalue>

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