<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:03:40 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-43630] Use SortPattern instead of raw BSON in query planner</title>
                <link>https://jira.mongodb.org/browse/SERVER-43630</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Now that &lt;tt&gt;SortPattern&lt;/tt&gt; is exposed, and we have a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/dad2a236fa7a10ce6795827688b019a1d2a6f78c/src/mongo/db/query/sort_pattern.h&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;type-safe representation&lt;/a&gt; of a sort pattern, we should use it in the query planner.&lt;/p&gt;

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

&lt;p&gt;There &lt;a href=&quot;https://github.com/mongodb/mongo/blob/dad2a236fa7a10ce6795827688b019a1d2a6f78c/src/mongo/db/query/planner_analysis.cpp#L642-L648&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;are&lt;/a&gt;&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/dad2a236fa7a10ce6795827688b019a1d2a6f78c/src/mongo/db/query/planner_analysis.cpp#L540&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;many&lt;/a&gt;&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/dad2a236fa7a10ce6795827688b019a1d2a6f78c/src/mongo/db/query/planner_analysis.cpp#L603&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;places&lt;/a&gt;&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/dad2a236fa7a10ce6795827688b019a1d2a6f78c/src/mongo/db/query/planner_access.cpp#L235&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;where&lt;/a&gt; we use &lt;a href=&quot;https://github.com/mongodb/mongo/blob/dad2a236fa7a10ce6795827688b019a1d2a6f78c/src/mongo/db/query/planner_access.cpp#L1204&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;raw&lt;/a&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/dad2a236fa7a10ce6795827688b019a1d2a6f78c/src/mongo/db/query/planner_access.cpp#L127&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;BSON&lt;/a&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/dad2a236fa7a10ce6795827688b019a1d2a6f78c/src/mongo/db/query/planner_access.cpp#L1207-L1208&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;in&lt;/a&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/dad2a236fa7a10ce6795827688b019a1d2a6f78c/src/mongo/db/query/query_solution.h#L136&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the&lt;/a&gt;&#160;planner.&lt;/p&gt;

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

&lt;p&gt;This work would involve creating a SortPattern as part of canonicalization, and hanging it off of the CanonicalQuery. Then, updating all callers of QueryRequest::getSort() in the query planner to use the sort pattern instead.&lt;/p&gt;</description>
                <environment></environment>
        <key id="939859">SERVER-43630</key>
            <summary>Use SortPattern instead of raw BSON in query planner</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="svilen.mihaylov@mongodb.com">Svilen Mihaylov</assignee>
                                    <reporter username="ian.boros@mongodb.com">Ian Boros</reporter>
                        <labels>
                            <label>neweng</label>
                            <label>qopt-team</label>
                    </labels>
                <created>Wed, 25 Sep 2019 15:57:57 +0000</created>
                <updated>Sun, 29 Oct 2023 22:16:49 +0000</updated>
                            <resolved>Thu, 27 Feb 2020 19:02:39 +0000</resolved>
                                                    <fixVersion>4.3.4</fixVersion>
                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2914389" author="svilen.mihaylov" created="Thu, 27 Feb 2020 15:54:47 +0000"  >&lt;p&gt;Need to split ticket: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46456&quot; title=&quot;Fully bake SortPattern into the query planner&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46456&quot;&gt;SERVER-46456&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2914216" author="xgen-internal-githook" created="Thu, 27 Feb 2020 14:51:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;smihaylov-mongodb&apos;, &apos;name&apos;: &apos;Svilen Mihaylov&apos;, &apos;email&apos;: &apos;svilen.mihaylov@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43630&quot; title=&quot;Use SortPattern instead of raw BSON in query planner&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43630&quot;&gt;&lt;del&gt;SERVER-43630&lt;/del&gt;&lt;/a&gt;: Use SortPattern instead of raw BSON in query planner&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9648c98f7e4879256ac5b7d5b3f7c56b9262ada8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9648c98f7e4879256ac5b7d5b3f7c56b9262ada8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2907219" author="svilen.mihaylov" created="Tue, 25 Feb 2020 14:27:35 +0000"  >&lt;p&gt;&lt;a href=&quot;https://mongodbcr.appspot.com/547490002/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/547490002/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2887569" author="svilen.mihaylov" created="Thu, 20 Feb 2020 22:09:28 +0000"  >&lt;p&gt;So I believe this would entail setting this pattern into the QueryRequest object, and then vending it out for every user of getSort(). I see however several instances where the _sort field is updated directly, looks like from serialization. Ideally all other things equal we want to remove the _sort as long we dont lose needed info, and update to the new struct.&lt;/p&gt;</comment>
                            <comment id="2887557" author="svilen.mihaylov" created="Thu, 20 Feb 2020 22:05:41 +0000"  >&lt;p&gt;I see a SortPattern is already created in cannonical_query around line 298.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;_sortPattern = SortPattern{_qr-&amp;gt;getSort(), _expCtx};&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="2710731" author="david.storch" created="Tue, 7 Jan 2020 21:08:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=eric.cox&quot; class=&quot;user-hover&quot; rel=&quot;eric.cox&quot;&gt;eric.cox&lt;/a&gt;, if you end up working on this (my understanding is that regular project work should open up soon and take priority), then please add me as a code reviewer. Thanks!&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10620">
                    <name>Issue split</name>
                                            <outwardlinks description="split to">
                                        <issuelink>
            <issuekey id="1197357">SERVER-46456</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.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_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>Tue, 7 Jan 2020 21:08:09 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 49 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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 49 weeks, 6 days 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>ian.boros@mongodb.com</customfieldvalue>
            <customfieldvalue>svilen.mihaylov@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvsf7r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr5pjz:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3288">Query 2019-12-30</customfieldvalue>
    <customfieldvalue id="3292">Query 2020-02-24</customfieldvalue>
    <customfieldvalue id="3494">Query 2020-03-09</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|hvs1h3:</customfieldvalue>

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