<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:18:50 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-28705] Add optimization to execute $lookup on local shards when possible</title>
                <link>https://jira.mongodb.org/browse/SERVER-28705</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Performing joins using local shard indices is cheap. In this setup, parent-child relationships can be implemented as long parent and child documents live on the same shard through proper routing by application developers. This feature is similar to ElasticSearch has_parent and has_child queries. $joinOne works with a single object while $joinMany works with an array of objects.&lt;/p&gt;</description>
                <environment></environment>
        <key id="372480">SERVER-28705</key>
            <summary>Add optimization to execute $lookup on local shards when possible</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="3">Duplicate</resolution>
                                        <assignee username="backlog-query-optimization">Backlog - Query Optimization</assignee>
                                    <reporter username="geekox86">Mohannad Saeed</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Apr 2017 04:48:56 +0000</created>
                <updated>Tue, 6 Dec 2022 04:03:47 +0000</updated>
                            <resolved>Thu, 30 Sep 2021 18:25:00 +0000</resolved>
                                                                    <component>Aggregation Framework</component>
                    <component>Sharding</component>
                                        <votes>2</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="1569775" author="charlie.swanson" created="Fri, 12 May 2017 15:47:52 +0000"  >&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;I&apos;d like to clarify a couple things. For one, the $joinOne part of this ticket has already been requested in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22384&quot; title=&quot;Add $lookUpOne to retrieve single Object on result&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22384&quot;&gt;SERVER-22384&lt;/a&gt;, so I will remove that part of this request so that it can be tracked independently. Please add comments related to that request on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22384&quot; title=&quot;Add $lookUpOne to retrieve single Object on result&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22384&quot;&gt;SERVER-22384&lt;/a&gt; to help us track the discussion. Second, I don&apos;t think I understand this request given that &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$lookup cannot look up into sharded collections&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The from collection cannot be sharded.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Knowing this, I can&apos;t think of any case where the described optimization makes sense, so I&apos;d like to close this as &quot;Won&apos;t Fix&quot;, or maybe mark it as &apos;depends on&apos; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29159&quot; title=&quot;Allow &amp;quot;from&amp;quot; collection of $lookup to be sharded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-29159&quot;&gt;&lt;del&gt;SERVER-29159&lt;/del&gt;&lt;/a&gt;. Further, even if the &apos;from&apos; collection were allowed to be sharded, there is no way that I know of to define a relationship between the shard keys of two collections to guarantee that some sort of parent/child or primary key/foreign key relationship will always be co-located.&lt;/p&gt;</comment>
                            <comment id="1545676" author="geekox86" created="Tue, 11 Apr 2017 04:34:21 +0000"  >&lt;p&gt;Hi, I think in MongoDB terminology, if both the local and foreign fields of the $lookup operation on all documents to be joined share the same shard key then this means that this operation can happen during scatter phase locally on shards, correct? If yes then the linked issue is very similar to what I am asking.&lt;/p&gt;</comment>
                            <comment id="1544934" author="thomas.schubert" created="Mon, 10 Apr 2017 12:33:50 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=geekox86&quot; class=&quot;user-hover&quot; rel=&quot;geekox86&quot;&gt;geekox86&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the feature request. I&apos;ve linked a related ticket, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27496&quot; title=&quot;allow self-$lookup on shard key value equality pre-merge on a sharded collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27496&quot;&gt;SERVER-27496&lt;/a&gt;, would you please review it and see if it meets your requirements. If not, would you please clarify how these commands would behave, and give an example of their usage?&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="383005">SERVER-29159</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                                                <inwardlinks description="has to be done after">
                                        <issuelink>
            <issuekey id="383005">SERVER-29159</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="340604">SERVER-27496</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="261987">SERVER-22384</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>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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 10 Apr 2017 12:33:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 39 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-29159'>SERVER-29159</a></s>]]></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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-282</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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 39 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-optimization</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
            <customfieldvalue>geekox86</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht5jhj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2ovr:</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_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>
                                    <customfieldvalue><![CDATA[kelsey.schubert@mongodb.com]]></customfieldvalue>
    

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrj04n:</customfieldvalue>

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