<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:17:21 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-28177] query_request_helper::asAggregationCommand() should return an AggregationRequest, not a BSONObj</title>
                <link>https://jira.mongodb.org/browse/SERVER-28177</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Since a view is defined by an aggregation pipeline, we convert any count, distinct, or find command request to an equivalent aggregation command.&lt;/p&gt;

&lt;p&gt;For the find command, this is accomplished with &lt;tt&gt;query_request_helper::asAggregationCommand()&lt;/tt&gt;.  Currently this returns a BSONObj, which we almost always parse immediately into an &lt;tt&gt;AggregationRequest&lt;/tt&gt;. For performance and simplicity, we should change these methods to return a &lt;tt&gt;StatusWith&amp;lt;AggregationRequest&amp;gt;&lt;/tt&gt; directly.&lt;/p&gt;

&lt;p&gt;Also, if the caller always uses &lt;tt&gt;uassertStatusOK&lt;/tt&gt; on the result, we can further simplify by returning &lt;tt&gt;AggregationRequest&lt;/tt&gt; directly, and throwing an exception in the error case.&lt;/p&gt;</description>
                <environment></environment>
        <key id="360108">SERVER-28177</key>
            <summary>query_request_helper::asAggregationCommand() should return an AggregationRequest, not a BSONObj</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="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="9">Done</resolution>
                                        <assignee username="david.percy@mongodb.com">David Percy</assignee>
                                    <reporter username="david.storch@mongodb.com">David Storch</reporter>
                        <labels>
                            <label>read-only-views</label>
                    </labels>
                <created>Thu, 2 Mar 2017 18:57:45 +0000</created>
                <updated>Wed, 26 Jul 2023 16:43:47 +0000</updated>
                            <resolved>Sat, 15 Jul 2023 20:54:18 +0000</resolved>
                                                    <fixVersion>7.1.0-rc0</fixVersion>
                    <fixVersion>7.0.0-rc8</fixVersion>
                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="5569113" author="xgen-internal-githook" created="Sat, 15 Jul 2023 22:01:32 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;David Percy&apos;, &apos;email&apos;: &apos;david.percy@mongodb.com&apos;, &apos;username&apos;: &apos;dpercy&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28177&quot; title=&quot;query_request_helper::asAggregationCommand() should return an AggregationRequest, not a BSONObj&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28177&quot;&gt;&lt;del&gt;SERVER-28177&lt;/del&gt;&lt;/a&gt; Avoid re-parsing when converting find to aggregate request&lt;/p&gt;

&lt;p&gt;When we get a find request on a view, we first translate it to an&lt;br/&gt;
aggregate request, because view resolution works by concatenating&lt;br/&gt;
aggregation pipelines. Previously we were converting an already-parsed&lt;br/&gt;
FindCommandRequest to a BSONObj, and then parsing that again as an&lt;br/&gt;
aggregation. Now we convert directly to AggregateCommandRequest, which&lt;br/&gt;
seems simpler and should be more efficient.&lt;br/&gt;
Branch: v7.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/539cbe0a645c960ccd4836dee64881a1f7c40c70&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/539cbe0a645c960ccd4836dee64881a1f7c40c70&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5568431" author="xgen-internal-githook" created="Sat, 15 Jul 2023 02:15:16 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;David Percy&apos;, &apos;email&apos;: &apos;david.percy@mongodb.com&apos;, &apos;username&apos;: &apos;dpercy&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28177&quot; title=&quot;query_request_helper::asAggregationCommand() should return an AggregationRequest, not a BSONObj&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28177&quot;&gt;&lt;del&gt;SERVER-28177&lt;/del&gt;&lt;/a&gt; Avoid re-parsing when converting find to aggregate request&lt;/p&gt;

&lt;p&gt;When we get a find request on a view, we first translate it to an&lt;br/&gt;
aggregate request, because view resolution works by concatenating&lt;br/&gt;
aggregation pipelines. Previously we were converting an already-parsed&lt;br/&gt;
FindCommandRequest to a BSONObj, and then parsing that again as an&lt;br/&gt;
aggregation. Now we convert directly to AggregateCommandRequest, which&lt;br/&gt;
seems simpler and should be more efficient.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/62b0dfa8ea2ce56594c00e84d6766f19ad0438c0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/62b0dfa8ea2ce56594c00e84d6766f19ad0438c0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5558549" author="david.percy" created="Tue, 11 Jul 2023 19:39:52 +0000"  >&lt;p&gt;Previously this ticket was about all 3 commands: find, count, distinct.  I&apos;ve split off &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-78874&quot; title=&quot;CountRequest::asAggregationCommand() should return an AggregationRequest, not a BSONObj&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-78874&quot;&gt;SERVER-78874&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-78875&quot; title=&quot;ParsedDistinct::asAggregationCommand() should return an AggregationRequest, not a BSONObj&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-78875&quot;&gt;SERVER-78875&lt;/a&gt; to handle count and distinct, and narrowed this ticket to be only about &apos;find&apos;.&lt;/p&gt;</comment>
                            <comment id="2271233" author="xinhao.zhang" created="Tue, 4 Jun 2019 20:45:35 +0000"  >&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <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>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2388969">SERVER-78875</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2388967">SERVER-78874</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>4.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25578"><![CDATA[v7.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, 4 Jun 2019 20:45:35 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        29 weeks, 4 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>dziana.hurynovich@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            29 weeks, 4 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>35.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.percy@mongodb.com</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>xinhao.zhang@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht3g3z:</customfieldvalue>

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

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