<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:23:58 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-30480] Update aggregation explain format to provide details of merge location</title>
                <link>https://jira.mongodb.org/browse/SERVER-30480</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, when a sharded pipeline is &lt;tt&gt;explained&lt;/tt&gt;, we expose a boolean field &lt;tt&gt;needsPrimaryShardMerger&lt;/tt&gt; to indicate whether the merge part of the pipeline must be run on the database&apos;s primary shard. Given that &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22760&quot; title=&quot;Sharded aggregation pipelines which involve taking a simple union should merge on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22760&quot;&gt;&lt;del&gt;SERVER-22760&lt;/del&gt;&lt;/a&gt; will make it possible for &lt;tt&gt;mongoS&lt;/tt&gt; to merge directly from the shards, this explain format should be updated to provide more detailed information.&lt;/p&gt;

&lt;p&gt;Some possible approaches include:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;A string field &lt;tt&gt;mergerType&lt;/tt&gt; which simply takes the value of &lt;tt&gt;mongos&lt;/tt&gt; or &lt;tt&gt;mongod&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;A more detailed &lt;tt&gt;merger&lt;/tt&gt; field identifying the shard or mongos which is to perform the merge. Note that in the case of a shard merge, this information may not be available at explain time.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="411700">SERVER-30480</key>
            <summary>Update aggregation explain format to provide details of merge location</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="bernard.gorman@mongodb.com">Bernard Gorman</assignee>
                                    <reporter username="bernard.gorman@mongodb.com">Bernard Gorman</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Aug 2017 17:29:15 +0000</created>
                <updated>Mon, 30 Oct 2023 23:14:40 +0000</updated>
                            <resolved>Mon, 21 Aug 2017 01:24:37 +0000</resolved>
                                                    <fixVersion>3.5.12</fixVersion>
                                    <component>Aggregation Framework</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1652478" author="xgen-internal-githook" created="Mon, 21 Aug 2017 01:23:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;gormanb&apos;, &apos;email&apos;: &apos;bernard.gorman@gmail.com&apos;, &apos;name&apos;: &apos;Bernard Gorman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30480&quot; title=&quot;Update aggregation explain format to provide details of merge location&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30480&quot;&gt;&lt;del&gt;SERVER-30480&lt;/del&gt;&lt;/a&gt; Update aggregation explain format to provide details of merge location&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/6ce6b59a2b0031b212c2bc8ba47ae61b2f81ac46&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/6ce6b59a2b0031b212c2bc8ba47ae61b2f81ac46&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1648759" author="david.storch" created="Tue, 15 Aug 2017 17:13:06 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bernard.gorman&quot; class=&quot;user-hover&quot; rel=&quot;bernard.gorman&quot;&gt;bernard.gorman&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asya&quot; class=&quot;user-hover&quot; rel=&quot;asya&quot;&gt;asya&lt;/a&gt; I&apos;m on board with the suggestion of reporting only &lt;tt&gt;mergerType&lt;/tt&gt;, which takes exactly one value from the set {&quot;primaryShard&quot;, &quot;anyShard&quot;, &quot;mongos&quot;}.&lt;/p&gt;</comment>
                            <comment id="1643951" author="bernard.gorman" created="Wed, 9 Aug 2017 12:19:32 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asya&quot; class=&quot;user-hover&quot; rel=&quot;asya&quot;&gt;asya&lt;/a&gt;! I&apos;ll wait to see what Dave thinks of this approach before opening a review.&lt;/p&gt;</comment>
                            <comment id="1643743" author="asya" created="Wed, 9 Aug 2017 03:45:32 +0000"  >&lt;p&gt;I like that: primaryShard, anyShard or mongos.  I think that will leave it open to adding &quot;designatedShard&quot; or &quot;allowedShard&quot; when/if we add configuration options to allow restricting &quot;any&quot; shard to a subset of shards...&lt;/p&gt;</comment>
                            <comment id="1643713" author="bernard.gorman" created="Wed, 9 Aug 2017 01:47:19 +0000"  >&lt;blockquote&gt;&lt;p&gt;So three values are possible (so far): primary mongod, any mongod, or mongos, correct?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asya&quot; class=&quot;user-hover&quot; rel=&quot;asya&quot;&gt;asya&lt;/a&gt;: that&apos;s correct. At the moment, an &lt;tt&gt;explain&lt;/tt&gt; following &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22760&quot; title=&quot;Sharded aggregation pipelines which involve taking a simple union should merge on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22760&quot;&gt;&lt;del&gt;SERVER-22760&lt;/del&gt;&lt;/a&gt; always &lt;a href=&quot;https://github.com/mongodb/mongo/blob/9062f71621d053e32beec1061f708e3fd08b0158/src/mongo/s/commands/cluster_aggregate.cpp#L97-L106&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;produces two boolean fields&lt;/a&gt;, &lt;tt&gt;needsPrimaryShardMerger&lt;/tt&gt; and &lt;tt&gt;mergeOnMongoS&lt;/tt&gt;. Dave suggested replacing these with either &lt;tt&gt;mongod&lt;/tt&gt;/&lt;tt&gt;mongos&lt;/tt&gt; or the name of the merging host, but as noted above if it&apos;s not the primary shard then the only thing we can do is output a random shard ID, which isn&apos;t really useful.&lt;/p&gt;

&lt;p&gt;I think the clearest approach would be a single &lt;tt&gt;mergeType&lt;/tt&gt; or &lt;tt&gt;mergeLocation&lt;/tt&gt; field which reflects the values of the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/9062f71621d053e32beec1061f708e3fd08b0158/src/mongo/db/pipeline/document_source.h#L135&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;new &lt;tt&gt;HostTypeRequirement&lt;/tt&gt; enum&lt;/a&gt;:&lt;br/&gt;
 &lt;tt&gt;primaryShard&lt;/tt&gt;, &lt;tt&gt;anyShard&lt;/tt&gt;, or &lt;tt&gt;mongos&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="1643665" author="asya" created="Tue, 8 Aug 2017 23:47:13 +0000"  >&lt;p&gt;The options are &lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;to keep needsPrimaryShardMerger and in cases where its value is false to add another field mergerType?&lt;/li&gt;
	&lt;li&gt;replace needsPrimaryShardMerger boolean and have a single field indicating mergeLocation: primary, mongos mongod?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I don&apos;t think we can ever know which mongod it will be if it&apos;s not the primary.   So three values are possible (so far): primary mongod, any mongod, or mongos, correct?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="266763">SERVER-22760</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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.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, 8 Aug 2017 23:47:13 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 25 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>bernard.gorman@mongodb.com</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htc6vz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|ht3yp3:</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="1823">Query 2017-08-21</customfieldvalue>
    <customfieldvalue id="1828">Query 2017-09-11</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|htbsyn:</customfieldvalue>

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