<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:17:05 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-48429] Remove StringData::ComparatorInterface from StringData</title>
                <link>https://jira.mongodb.org/browse/SERVER-48429</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;StringData::ComparatorInterface and most of its callers can be improved in several respects. I want to open this ticket to give the StringData::ComparatorInterface some attention. It&apos;s used in some very important places.&lt;/p&gt;

&lt;p&gt;Move it out of the StringData class to be a first-class type. StringData::ComparatorInterface is not part of what StringData is. It&apos;s just one particular thing you can do with StringData. We already have a separate file for its definition, `mongo/base/string_data_comparator_interface.h`, so we can essentially rename `StringData::ComparatorInterface` to `StringDataComparator` in that file. We can remove &quot;Interface&quot; from the name. I&apos;m looking at the typedefs:&lt;br/&gt;
    StringDataUnorderedSet&lt;br/&gt;
    StringDataUnorderedMap&lt;/p&gt;

&lt;p&gt;And they are hard to use correctly because their hasher and key_eq functors are stateful, so a factory function is needed, and the functors provided have lifetime caveats on an underlying StringData::ComparatorInterface everybody just uses the singleton kInstance, so the whole thing can just be a family of matched stateless functors for every use in the codebase. Many can now be migrated to use stdx::unordered_map and stdx::unordered_set and be more efficient.&lt;/p&gt;

&lt;p&gt;The StringDataComparatorInterface is missing an &lt;tt&gt;equal&lt;/tt&gt; virtual function. It has a compare and a hash_combine but no equal. This means that doing hash container lookups will have to use compare, which is potentially far more expensive than == on StringData, as equality can short-circuit in the case of unequal string lengths.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="1363223">SERVER-48429</key>
            <summary>Remove StringData::ComparatorInterface from StringData</summary>
                <type id="5" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14716&amp;avatarType=issuetype">Sub-task</type>
                            <parent id="474744">SERVER-32422</parent>
                                    <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="billy.donahue@mongodb.com">Billy Donahue</assignee>
                                    <reporter username="billy.donahue@mongodb.com">Billy Donahue</reporter>
                        <labels>
                            <label>servicearch-wfbf-sprint</label>
                    </labels>
                <created>Wed, 27 May 2020 05:19:39 +0000</created>
                <updated>Thu, 2 Nov 2023 18:56:55 +0000</updated>
                            <resolved>Thu, 2 Nov 2023 18:56:54 +0000</resolved>
                                                    <fixVersion>7.2.0-rc0</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5850300" author="xgen-internal-githook" created="Thu, 2 Nov 2023 18:09:23 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48429&quot; title=&quot;Remove StringData::ComparatorInterface from StringData&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48429&quot;&gt;&lt;del&gt;SERVER-48429&lt;/del&gt;&lt;/a&gt; StringDataComparator&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8505d6092a6680179d27e1b8bf103a4e7577c3e6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8505d6092a6680179d27e1b8bf103a4e7577c3e6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5823253" author="billy.donahue" created="Sun, 29 Oct 2023 02:37:00 +0000"  >&lt;p&gt;Picking this up for Skunkworks as a minor subtask of the larger &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32422&quot; title=&quot;convert StringData to std::string_view&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32422&quot;&gt;SERVER-32422&lt;/a&gt; ticket.&lt;/p&gt;</comment>
                            <comment id="4539358" author="billy.donahue" created="Tue, 10 May 2022 19:39:03 +0000"  >&lt;p&gt;Reopening as this is still a performance and modularity win.&lt;/p&gt;</comment>
                            <comment id="4375671" author="JIRAUSER1262719" created="Thu, 24 Feb 2022 21:55:31 +0000"  >&lt;p&gt;We haven&#8217;t heard back from you for at least one calendar year, so this issue is being closed. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;</comment>
                            <comment id="3121318" author="acm" created="Wed, 27 May 2020 15:17:07 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=billy.donahue&quot; class=&quot;user-hover&quot; rel=&quot;billy.donahue&quot;&gt;billy.donahue&lt;/a&gt; - &lt;/p&gt;

&lt;p&gt;Yeah, I don&apos;t have any real objection to improvements in this space. But I do want to call out two things:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The use of &lt;tt&gt;Interface&lt;/tt&gt; in the mongodb codebase has a long tradition, but is supposed to be reserved for things that consist entirely of pure virtual functions, perhaps with a sprinkling of constants or static methods. In any event, the renaming doesn&apos;t seem to be the key aspect here.&lt;/li&gt;
	&lt;li&gt;My recollection is that the interface/implementation partition was required to avoid circular dependencies and layer violations. But perhaps those have shaken out in other ways by now, especially since we have enforced the acyclic graph for a good while now.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="3120550" author="billy.donahue" created="Wed, 27 May 2020 15:03:21 +0000"  >&lt;p&gt;It&apos;s a base class. I don&apos;t think it&apos;s necessary to put the suffix &quot;Interface&quot; on base classes. It&apos;s redundant IMO. The BSON Comparators (which are also hashers) are similarly stateful, mandatory-polymorphic, and referential and could also be improved, yes. What I see in BSON and StringData comparator usage is that a caller often knows the concrete type of compare/hash they need, and the polymorphism doesn&apos;t actually help in those cases.&lt;/p&gt;

&lt;p&gt;The common SimpleBSONObjComparator, SimpleBSONElementComparator, and &lt;tt&gt;SimpleStringDataComparator&lt;/tt&gt; can get a fast non-polymorphic path. They are the most common cases. I don&apos;t think functors should point to outside objects with lifetime concerns. It makes them slower and fragile. They can be passed around by value and own their own state, with shared_ptr if necessary. A comparator is called a lot more than it is constructed or passed around, so construction cost should be insignificant. This is an improvement that could spread out to the BSON Comparators.&lt;/p&gt;</comment>
                            <comment id="3119620" author="billy.donahue" created="Wed, 27 May 2020 07:26:08 +0000"  >
&lt;p&gt;Added benchmark to compare speed of &lt;br/&gt;
AbslFlatHashMap vs SimpleStringDataUnorderedMap.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/BillyDonahue/69ea95e128e1ebd1986b7689efaf6721&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/BillyDonahue/69ea95e128e1ebd1986b7689efaf6721&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It&apos;s not close at all. AbslFlatHashMap is 2.5x faster!&lt;br/&gt;
The only difference between AbslFlatHashMap and SimpleStringDataUnorderedMap is the choice of Hash and KeyEq functors. They are instantiations of the same underlying absl::flat_hash_map container class template.&lt;/p&gt;

&lt;p&gt;The StringDataComparatorInterface functors are a slow choice.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="474744">SERVER-32422</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2356218">SERVER-77698</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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25132"><![CDATA[Service Arch]]></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, 27 May 2020 13:57:03 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>lauren.lewis@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxn5cf:</customfieldvalue>

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

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