<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:37: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-78081] Optimize memory footprint of optional fields in query_stats::KeyGenerators</title>
                <link>https://jira.mongodb.org/browse/SERVER-78081</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I was reading over this page after I was surprised by the size of some of these objects: &lt;a href=&quot;https://www.boost.org/doc/libs/1_59_0/libs/optional/doc/html/boost_optional/tutorial/performance_considerations.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.boost.org/doc/libs/1_59_0/libs/optional/doc/html/boost_optional/tutorial/performance_considerations.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;It is probably worth doing some of that &lt;tt&gt;bool _has_allow_partial_results&lt;/tt&gt; pattern rather than all the boost::optionals we have here: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/cf00278a5230148eaf71c04df84f6c6de77decee/src/mongo/db/query/query_stats_find_key_generator.h#L91&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/cf00278a5230148eaf71c04df84f6c6de77decee/src/mongo/db/query/query_stats_find_key_generator.h#L91&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2368057">SERVER-78081</key>
            <summary>Optimize memory footprint of optional fields in query_stats::KeyGenerators</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="william.qian@mongodb.com">William Qian</assignee>
                                    <reporter username="charlie.swanson@mongodb.com">Charlie Swanson</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Jun 2023 14:50:26 +0000</created>
                <updated>Sun, 29 Oct 2023 21:20:04 +0000</updated>
                            <resolved>Tue, 18 Jul 2023 17:24:28 +0000</resolved>
                                                    <fixVersion>7.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5565365" author="xgen-internal-githook" created="Thu, 13 Jul 2023 21:30:52 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;William Qian&apos;, &apos;email&apos;: &apos;william.qian@mongodb.com&apos;, &apos;username&apos;: &apos;wqian94&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-78081&quot; title=&quot;Optimize memory footprint of optional fields in query_stats::KeyGenerators&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-78081&quot;&gt;&lt;del&gt;SERVER-78081&lt;/del&gt;&lt;/a&gt; Refactor key generator members to reduce object size&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b1567c946c31f6232303cb81faab01426d914f81&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b1567c946c31f6232303cb81faab01426d914f81&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5559598" author="xgen-internal-githook" created="Wed, 12 Jul 2023 08:53:51 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;liubov.molchanova&apos;, &apos;email&apos;: &apos;liubov.molchanova@mongodb.com&apos;, &apos;username&apos;: &apos;liubov-molchanova&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-78081&quot; title=&quot;Optimize memory footprint of optional fields in query_stats::KeyGenerators&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-78081&quot;&gt;&lt;del&gt;SERVER-78081&lt;/del&gt;&lt;/a&gt; Refactor key generator members to reduce object size&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit 41a8b3b19f57681424bbdbe98afdb307e1d58e46.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e8972a252d45877c7d0f4f5fd65d4596cf34d9ef&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e8972a252d45877c7d0f4f5fd65d4596cf34d9ef&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5558198" author="xgen-internal-githook" created="Tue, 11 Jul 2023 18:07:55 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;William Qian&apos;, &apos;email&apos;: &apos;william.qian@mongodb.com&apos;, &apos;username&apos;: &apos;wqian94&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-78081&quot; title=&quot;Optimize memory footprint of optional fields in query_stats::KeyGenerators&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-78081&quot;&gt;&lt;del&gt;SERVER-78081&lt;/del&gt;&lt;/a&gt; Refactor key generator members to reduce object size&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/41a8b3b19f57681424bbdbe98afdb307e1d58e46&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/41a8b3b19f57681424bbdbe98afdb307e1d58e46&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5516817" author="JIRAUSER1274148" created="Wed, 21 Jun 2023 21:14:30 +0000"  >&lt;p&gt;We could also consider using &lt;a href=&quot;https://en.cppreference.com/w/cpp/language/bit_field&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;bit fields&lt;/a&gt;. Something like&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;BSONObj _readConcern;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;int64_t batchSize;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;int32_t maxTimeNS;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;bool _allowPartialResults;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;bool _noCursorTimeout;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;struct {&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160;&#160;&#160; bool readConcern : 1 = false;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160;&#160;&#160; bool allowPartialResults : 1 = false;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160;&#160;&#160; bool noCursorTimeout : 1 = false;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160;&#160;&#160; bool maxTimeNS : 1 = false;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160;&#160;&#160; bool batchSize : 1 = false;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;} hasField;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;should do the trick. `hasfield` is 1B, so this should be `sizeof (BSONObj) + 16` bytes. (`_allowPartialResults`, `_noCursorTimeout`, and `hasField` all have alignments and sizes of 1.)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.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="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>Wed, 21 Jun 2023 21:14:30 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        29 weeks, 6 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_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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2885</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>
                            29 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>164.0</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1w1jk:</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="7237">QO 2023-06-26</customfieldvalue>
    <customfieldvalue id="7240">QO 2023-07-10</customfieldvalue>
    <customfieldvalue id="7242">QO 2023-07-24</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|i2dgfb:</customfieldvalue>

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