<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:24:44 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>[DRIVERS-2103] Deprecate &quot;$out Aggregation Pipeline Operator&quot; spec?</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-2103</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/out-aggregation-pipeline-operator.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/out-aggregation-pipeline-operator.rst&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Is this spec still applicable?&lt;br/&gt;
TIL the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#use-of-read-preferences-with-commands&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;SS spec overwrites&lt;/a&gt; the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/out-aggregation-pipeline-operator.rst#read-preferences&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$out spec Read Preferences&lt;/a&gt; section&lt;/p&gt;

&lt;p&gt;The Read Preference part seems like the meat of the spec, so without it, it should be deprecated/removed?&lt;/p&gt;</description>
                <environment></environment>
        <key id="227579">DRIVERS-2103</key>
            <summary>Deprecate &quot;$out Aggregation Pipeline Operator&quot; spec?</summary>
                <type id="14901" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14700&amp;avatarType=issuetype">Spec Change</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="jmikola@mongodb.com">Jeremy Mikola</assignee>
                                    <reporter username="bjori">Hannes Magnusson</reporter>
                        <labels>
                    </labels>
                <created>Fri, 28 Aug 2015 19:29:34 +0000</created>
                <updated>Tue, 9 Aug 2022 17:32:49 +0000</updated>
                            <resolved>Tue, 9 Aug 2022 17:32:49 +0000</resolved>
                                                        <component>Server Selection</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4738394" author="patrick.freed" created="Tue, 9 Aug 2022 17:32:49 +0000"  >&lt;p&gt;The $out Aggregation Pipeline Operator spec was removed in &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-823&quot; title=&quot;Support $merge and $out executing on secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-823&quot;&gt;DRIVERS-823&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1788053" author="jeff.yemin" created="Mon, 29 Jan 2018 18:53:35 +0000"  >&lt;p&gt;Let&apos;s delete this spec and remove any reference to it in the server selection specification.&lt;/p&gt;</comment>
                            <comment id="1025604" author="emily.stolfo@10gen.com" created="Wed, 9 Sep 2015 19:59:17 +0000"  >&lt;p&gt;Sorry for the delay - I just talked to David about this and am catching up with the discussion. I&apos;ll take a look at the spec and see if any (wording) changes need to be made to be consistent with the SS spec.&lt;/p&gt;</comment>
                            <comment id="1020941" author="behackett" created="Wed, 2 Sep 2015 18:36:47 +0000"  >&lt;p&gt;That seems like a good reason &lt;b&gt;not&lt;/b&gt; to reroute aggregate with $out and instead let it fail if the user uses the wrong read preference (which I believe is the expected behavior from SS).&lt;/p&gt;</comment>
                            <comment id="1020917" author="bjori" created="Wed, 2 Sep 2015 18:15:23 +0000"  >&lt;p&gt;One thing I noticed in the spec too.&lt;br/&gt;
It expects a warning being issued when re-routing to primary because:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Reason for warning: Rerouting the aggregation with $out to the primary could present a problem such that the collection is written and then queried by the user with read preference non-primary before replication has completed. The user risks querying the collection before it is fully replicated.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;And then links to DRIVERSOLD-72 (formerly known as DRIVERS-84).&lt;br/&gt;
However, that ticket has been updated to say &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;superseded by the Server Selection spec&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Which does not issue such warning.&lt;/p&gt;

&lt;p&gt;The implied notification to the user that the following read from the $out collection will fail is therefore never issued.&lt;/p&gt;</comment>
                            <comment id="1019868" author="david.golden" created="Tue, 1 Sep 2015 21:12:40 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=emily.stolfo%4010gen.com&quot; class=&quot;user-hover&quot; rel=&quot;emily.stolfo@10gen.com&quot;&gt;emily.stolfo@10gen.com&lt;/a&gt;, there&apos;s been a bunch of discussion about how this spec should be read in concert with Server Selection.&lt;/p&gt;

&lt;p&gt;On the Drivers flowdock, there seems to be some consensus that this is the right behavior:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;aggregate with &apos;$out&apos; is a write command for the purpose of server selection&lt;/li&gt;
	&lt;li&gt;aggregate without &apos;$out&apos; is a &apos;may-use-secondary&apos; command for the purposes of server selection.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Given that clarification, I&apos;m not sure the warning makes sense anymore, either.&lt;/p&gt;

&lt;p&gt;As you were the author, could you please amend it and then see about getting it marked &quot;approved&quot;? Perhaps &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=barrie&quot; class=&quot;user-hover&quot; rel=&quot;barrie&quot;&gt;barrie&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rathi.gnanasekaran&quot; class=&quot;user-hover&quot; rel=&quot;rathi.gnanasekaran&quot;&gt;rathi.gnanasekaran&lt;/a&gt; can suggest a shorter spec approval process for this amendment.&lt;/p&gt;</comment>
                            <comment id="1018671" author="david.golden" created="Mon, 31 Aug 2015 20:55:45 +0000"  >&lt;p&gt;I think you&apos;re reading more into the SS spec than is there.  SS says this about &lt;tt&gt;$out&lt;/tt&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The aggregate command succeeds on a secondary unless $out is specified. It is the user&apos;s responsibility not to aggregate with $out on a secondary.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That&apos;s an informational comment, not a normative requirement.  The SS spec only says that aggregate &lt;b&gt;without&lt;/b&gt; &lt;tt&gt;$out&lt;/tt&gt; is &quot;may-use-secondary&quot;.&lt;/p&gt;

&lt;p&gt;The omission of specific rules for &lt;tt&gt;$out&lt;/tt&gt; was done intentionally so as to not break whatever legacy driver behavior existed for &lt;tt&gt;$out&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;tt&gt;$out&lt;/tt&gt; spec says that when &lt;tt&gt;$out&lt;/tt&gt; is given, then the aggregation is a write command and routes to the primary &amp;#8211; which is exactly consistent with the SS rules for write commands (which always ignore read preferences).  It &lt;b&gt;additionally&lt;/b&gt; says that a warning needs to be issued if &lt;tt&gt;$out&lt;/tt&gt; is given with a read pref other than &apos;primary&apos;.  That&apos;s an API choice and the SS spec has nothing to say about that.&lt;/p&gt;

&lt;p&gt;I&apos;d have no objections whatsoever to someone revising the &lt;tt&gt;$out&lt;/tt&gt; spec to use the newer terminology and clarify that when &lt;tt&gt;$out&lt;/tt&gt; is present, &lt;tt&gt;aggregate&lt;/tt&gt; is a write command, and when it&apos;s omitted, then &lt;tt&gt;aggregate&lt;/tt&gt; is a &apos;may-use-secondary&apos; read command.&lt;/p&gt;</comment>
                            <comment id="1018621" author="bjori" created="Mon, 31 Aug 2015 20:17:28 +0000"  >&lt;p&gt;Either we must redirect to the primary, as per the $out aggregation spec, or we must leave it to the user, as per SS.&lt;br/&gt;
We can&apos;t do both.&lt;/p&gt;

&lt;p&gt;Either we violate the $out aggregation spec by apply the user read preference.&lt;br/&gt;
Or we violate the SS spec by not applying the user read preference.&lt;/p&gt;</comment>
                            <comment id="1018608" author="david.golden" created="Mon, 31 Aug 2015 20:03:20 +0000"  >&lt;p&gt;I think it&apos;s applicable.  SS leaves it up to &quot;the user&quot; to define how to handle aggregate with &lt;tt&gt;$out&lt;/tt&gt;.  The aggregation spec says &quot;redirect to primary and warn&quot;, which is saving the user from doing the wrong thing.  I don&apos;t think there&apos;s a conflict.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                            <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10940"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hscsr3:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>