<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:26:14 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-74004] Investigate implementation of Nebari SortStage that doesn&apos;t require double virtual dispatch</title>
                <link>https://jira.mongodb.org/browse/SERVER-74004</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Current implementation of SortStage completely hides private template implementation, but this is done at a cost of double virtual method call in getNext and some field indirection.&lt;/p&gt;

&lt;p&gt;We should consider implementing a variant that only requires one virtual dispatch and doesn&apos;t require field indirection, but that may require some framework changes. Few ideas:&lt;/p&gt;

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

&lt;p&gt;1) [&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=anna.wawrzyniak%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;anna.wawrzyniak@mongodb.com&quot;&gt;anna.wawrzyniak@mongodb.com&lt;/a&gt;] Use static factory methods, like SortStage::make(...) rather than makeS&amp;lt;SortStage&amp;gt;. This pattern would relax the requirement of makeS returning a runtime instance of strictly SortStage and instead allow for returning subtypes of SortStage. This would allow for SortStage to have specialized derived implementation classes that can be templatized, without callers.&#160;&lt;/p&gt;

&lt;p&gt;The side benefit of doing for all stages is better IDE interaction.&lt;/p&gt;

&lt;p&gt;It may also allow for more control over the creation process (i.e. [&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=martin.neupauer%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;martin.neupauer@mongodb.com&quot;&gt;martin.neupauer@mongodb.com&lt;/a&gt; ] idea of memory usage tracking)&lt;/p&gt;

&lt;p&gt;A POC of such implementation for SortStage is here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/10gen/mongo/compare/anna.wawrzyniak/sort_perf_make?expand=1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/compare/anna.wawrzyniak/sort_perf_make?expand=1&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;2) [&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andrew.paroski%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;andrew.paroski@mongodb.com&quot;&gt;andrew.paroski@mongodb.com&lt;/a&gt; ] Use an aligned char buffer for individual key/value pair storage (and use reinterp-cast as needed), and see how much we can move from SortImpl to SortStage. I&apos;m not sure how this experiment would play out, but I&apos;d be interested to spend a few hours trying it out and seeing if anything interesting comes from it, and looking at if perf and machine code quality and size is better or worse.&lt;/p&gt;

&lt;p&gt;3)&#160; [&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andrew.paroski%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;andrew.paroski@mongodb.com&quot;&gt;andrew.paroski@mongodb.com&lt;/a&gt; ] I&apos;ve been thinking about a general optimization for PlanStage::getNext(), where instead of using C++ virtual methods instead we use function pointers. The neat thing about this is that a given stage&apos;s &quot;getNext&quot; func ptr could then return a &lt;tt&gt;pair&amp;lt;Result, func-ptr-type&amp;gt;&lt;/tt&gt;&#160;and provide a (potentially different) function pointer to call next time. Certain stages like LoopJoinStage that could take advantage of this to improve perf. This would also reduce the number of memory accesses needed for dispatch. (I&apos;m also interested in seeing if it would be a win for each node&apos;s&#160;&lt;em&gt;parent&lt;/em&gt;&#160;to hold its getNext func ptr.)&#160;(edited)&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2264736">SERVER-74004</key>
            <summary>Investigate implementation of Nebari SortStage that doesn&apos;t require double virtual dispatch</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="anna.wawrzyniak@mongodb.com">Anna Wawrzyniak</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 Feb 2023 19:52:11 +0000</created>
                <updated>Tue, 14 Mar 2023 15:09:30 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5267439" author="JIRAUSER1257467" created="Mon, 13 Mar 2023 13:41:24 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andrew.paroski%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;andrew.paroski@mongodb.com&quot;&gt;andrew.paroski@mongodb.com&lt;/a&gt;&#160;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=anna.wawrzyniak%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;anna.wawrzyniak@mongodb.com&quot;&gt;anna.wawrzyniak@mongodb.com&lt;/a&gt; are you ok with sending this ticket to the backlog?&lt;/p&gt;</comment>
                            <comment id="5237100" author="JIRAUSER1257467" created="Tue, 28 Feb 2023 16:36:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andrew.paroski%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;andrew.paroski@mongodb.com&quot;&gt;andrew.paroski@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=anna.wawrzyniak%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;anna.wawrzyniak@mongodb.com&quot;&gt;anna.wawrzyniak@mongodb.com&lt;/a&gt; during Triage, we discussed this ticket and we are considering sending it to the backlog, but please let us know your opinions ?&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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 28 Feb 2023 16:36:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        47 weeks, 2 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>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ana.meza@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            47 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ana.meza@mongodb.com</customfieldvalue>
            <customfieldvalue>anna.wawrzyniak@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-query-execution</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1w13z:</customfieldvalue>

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

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