<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:19:26 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-49289] Support specifying a collection by its UUID to the aggregate command</title>
                <link>https://jira.mongodb.org/browse/SERVER-49289</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This allows the sender of the command to rely on NamespaceNotFound if the collection has been dropped, even if a collection with the same name was later re-created.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Change &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.4.0-rc11/src/mongo/db/pipeline/aggregation_request.h#L312&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;AggregationRequest::_nss&lt;/a&gt; from a NamespaceString to a NamespaceStringOrUUID.&lt;/li&gt;
	&lt;li&gt;Change the return type of &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.4.0-rc11/src/mongo/db/pipeline/aggregation_request.cpp#L273&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;AggregationRequest::parseNs()&lt;/a&gt; to NamespaceStringOrUUID and add &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.4.0-rc11/src/mongo/db/commands.cpp#L280-L281&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;a case for UUID similar to CommandHelpers::parseNsOrUUID()&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;Change &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.4.0-rc11/src/mongo/db/commands/run_aggregate.cpp#L504&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;runAggregate()&lt;/a&gt; to get the NamespaceStringOrUUID. One approach would be to rename and change the return type of AggregateRequest::getNamespaceString().&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;It should be fine for &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.4.0-rc11/src/mongo/db/pipeline/document_source_cursor.cpp#L138&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the AutoGetCollectionForRead in DocumentSourceCursor::loadBatch()&lt;/a&gt; to continue to using a NamespaceString rather than a UUID because the PlanExecutor is guaranteed to be killed (and for the aggregation pipeline to eventually error) if the collection is dropped while the cursor is being iterated.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1400125">SERVER-49289</key>
            <summary>Support specifying a collection by its UUID to the aggregate command</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="13201">Fixed</resolution>
                                        <assignee username="jack.mulrow@mongodb.com">Jack Mulrow</assignee>
                                    <reporter username="max.hirschhorn@mongodb.com">Max Hirschhorn</reporter>
                        <labels>
                            <label>PM-234-M2</label>
                            <label>PM-234-T-data-clone</label>
                            <label>query-work-resharding</label>
                    </labels>
                <created>Thu, 2 Jul 2020 14:42:27 +0000</created>
                <updated>Sun, 29 Oct 2023 22:06:10 +0000</updated>
                            <resolved>Wed, 26 Aug 2020 22:16:52 +0000</resolved>
                                                    <fixVersion>4.7.0</fixVersion>
                                    <component>Aggregation Framework</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3361106" author="xgen-internal-githook" created="Wed, 26 Aug 2020 21:09:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jack Mulrow&apos;, &apos;email&apos;: &apos;jack.mulrow@mongodb.com&apos;, &apos;username&apos;: &apos;jsmulrow&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-49289&quot; title=&quot;Support specifying a collection by its UUID to the aggregate command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-49289&quot;&gt;&lt;del&gt;SERVER-49289&lt;/del&gt;&lt;/a&gt; Add collectionUUID option to aggregate&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/81169c43da6fe06789bcec195909872943b85f53&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/81169c43da6fe06789bcec195909872943b85f53&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3338404" author="jack.mulrow" created="Thu, 13 Aug 2020 21:05:12 +0000"  >&lt;p&gt;Got it. Routers do have each sharded collection&apos;s UUID in the routing table, but the UUID &lt;a href=&quot;https://github.com/mongodb/mongo/blob/817ae16840a02b66ce2a50aca44754450bbce6b0/src/mongo/s/chunk_manager.h#L284-L285&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;is a &lt;tt&gt;boost::optional&lt;/tt&gt;&lt;/a&gt; which makes me worried we might not always have access to it. I&apos;m guessing that&apos;s a holdover from upgrade/downgrade work when we added UUIDs though so it&apos;s probably safe to use them. And your idea for unsharded collections sounds good to me.&lt;/p&gt;</comment>
                            <comment id="3337029" author="max.hirschhorn@10gen.com" created="Thu, 13 Aug 2020 14:48:56 +0000"  >&lt;p&gt;The aggregation pipeline for collection cloning requires merging the aggregations from the different donor shards together.&lt;/p&gt;

&lt;p&gt;Doesn&apos;t mongos (or a mongod acting as a router) know the collection UUID for any sharded collections? And so any collection UUID it doesn&apos;t know about it could assume are unsharded and route to the primary shard for the database?&lt;/p&gt;</comment>
                            <comment id="3331679" author="jack.mulrow" created="Mon, 10 Aug 2020 21:55:49 +0000"  >&lt;p&gt;I think it does. Is it a hard requirement for the sender to act as a router in this case? From looking through ClusterAggregate there is a lot of logic that may need to change (like figuring out how to resolve a UUID on a router for targeting / getting the required privileges), so I imagine we could save some work by only changing single replica set aggregate to support a UUID if that&apos;s possible.&lt;/p&gt;

&lt;p&gt;Unless you&apos;re saying ClusterAggregate would accept a UUID only if a collection name was also included (as opposed to in place of a collection name), so it can still target by collection name but we can use the UUID on the targeted shards to verify the correct version of the collection still exists. I don&apos;t think that would be too much more work, assuming I&apos;m not overlooking something.&lt;/p&gt;</comment>
                            <comment id="3330984" author="max.hirschhorn@10gen.com" created="Mon, 10 Aug 2020 16:33:32 +0000"  >&lt;blockquote&gt;
&lt;p&gt;That is, it won&apos;t go through mongos nor will the sender be acting as a router the same way mongos does.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I misspoke - the sender will be acting as a router the same way mongos does. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jack.mulrow&quot; class=&quot;user-hover&quot; rel=&quot;jack.mulrow&quot;&gt;jack.mulrow&lt;/a&gt; does that mean we&apos;d want ClusterAggregate to accept a UUID in addition to a collection name?&lt;/p&gt;</comment>
                            <comment id="3295667" author="max.hirschhorn@10gen.com" created="Tue, 21 Jul 2020 22:35:49 +0000"  >&lt;p&gt;Resharding is going to an aggregate command with a UUID directly on a replica set shard. That is, it won&apos;t go through mongos nor will the sender be acting as a router the same way mongos does. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jack.mulrow&quot; class=&quot;user-hover&quot; rel=&quot;jack.mulrow&quot;&gt;jack.mulrow&lt;/a&gt;, I don&apos;t think it is necessary for ClusterAggregate to accept a UUID in addition to a collection name.&lt;/p&gt;</comment>
                            <comment id="3295598" author="jack.mulrow" created="Tue, 21 Jul 2020 21:55:17 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt;, is this ticket just for supporting specifying a collection by UUID for &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/pipeline_command.cpp#L42&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;single replica set aggregate&lt;/a&gt;&#160;or does &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/s/query/cluster_aggregate.h#L55&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;cluster aggregate&lt;/a&gt; need to support it as well?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                            <outwardlinks description="has to be done before">
                                        <issuelink>
            <issuekey id="1416251">SERVER-49785</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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.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, 21 Jul 2020 21:55:17 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 24 weeks 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-234</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, 24 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxt9bj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxdfev:</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="4251">Sharding 2020-09-07</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|hxsvkv:</customfieldvalue>

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