<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:41:23 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-35896] Support &quot;replaceDocuments&quot; mode in $out</title>
                <link>https://jira.mongodb.org/browse/SERVER-35896</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If an existing document already exists with the same unique key, the old document is replaced with the new one.&lt;/p&gt;</description>
                <environment></environment>
        <key id="565413">SERVER-35896</key>
            <summary>Support &quot;replaceDocuments&quot; mode in $out</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="13201">Fixed</resolution>
                                        <assignee username="nicholas.zolnierz@mongodb.com">Nicholas Zolnierz</assignee>
                                    <reporter username="kyle.suarez@mongodb.com">Kyle Suarez</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Jun 2018 20:37:05 +0000</created>
                <updated>Sun, 29 Oct 2023 22:30:15 +0000</updated>
                            <resolved>Mon, 6 Aug 2018 15:08:51 +0000</resolved>
                                                    <fixVersion>4.1.2</fixVersion>
                                    <component>Aggregation Framework</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="1964130" author="xgen-internal-githook" created="Thu, 2 Aug 2018 16:44:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;nzolnierzmdb&apos;, &apos;name&apos;: &apos;Nick Zolnierz&apos;, &apos;email&apos;: &apos;nicholas.zolnierz@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35896&quot; title=&quot;Support &amp;quot;replaceDocuments&amp;quot; mode in $out&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35896&quot;&gt;&lt;del&gt;SERVER-35896&lt;/del&gt;&lt;/a&gt;: Support &apos;replaceDocuments&apos; mode in $out&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/afbe688f0f18c5cb474fb1bcd933d6e06c0c5291&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/afbe688f0f18c5cb474fb1bcd933d6e06c0c5291&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1943228" author="kyle.suarez" created="Tue, 10 Jul 2018 15:45:42 +0000"  >&lt;p&gt;I filed &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36047&quot; title=&quot;(Sharded target collection) Enforce existence of unique index containing fields of $out uniqueKey&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36047&quot;&gt;&lt;del&gt;SERVER-36047&lt;/del&gt;&lt;/a&gt; to track the enforcement of a unique index.&lt;/p&gt;</comment>
                            <comment id="1943206" author="nicholas.zolnierz" created="Tue, 10 Jul 2018 15:41:18 +0000"  >&lt;p&gt;Makes sense to me, though I&apos;d prefer to keep the uniqueKey work separate from this ticket. Also &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kyle.suarez&quot; class=&quot;user-hover&quot; rel=&quot;kyle.suarez&quot;&gt;kyle.suarez&lt;/a&gt;, one other subtlety that we discussed in addition to what you mentioned above is allowing a missing &lt;tt&gt;_id&lt;/tt&gt; in the pipeline document since the update will autogenerate one. &lt;/p&gt;</comment>
                            <comment id="1943181" author="kyle.suarez" created="Tue, 10 Jul 2018 15:35:39 +0000"  >&lt;blockquote&gt;
&lt;p&gt;We might be able to do the same trick that we do for existing $out, where before we finish up we assert that the same indices and options still exist, thereby checking that it&apos;s still unique.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Yeah, we definitely want to keep that with dropTarget: true. When dropTarget: false, I think it&apos;s sufficient to check once at aggregation planning time, and not before every call to spill().&lt;/p&gt;</comment>
                            <comment id="1942997" author="charlie.swanson" created="Tue, 10 Jul 2018 13:48:55 +0000"  >&lt;p&gt;Oh, yea this totally makes sense. I forgot in the scope, we are allowed to require the &apos;uniqueKey&apos; be provably unique via a unique index. We might be able to do the same trick that we do for existing $out, where &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e86d684515abe1c4dbf79dbb71741b5db0317039/src/mongo/db/pipeline/document_source_out.cpp#L213&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;before we finish up we assert that the same indices and options still exist&lt;/a&gt;, thereby checking that it&apos;s still unique.&lt;/p&gt;</comment>
                            <comment id="1942857" author="kyle.suarez" created="Tue, 10 Jul 2018 11:14:13 +0000"  >&lt;p&gt;Per in-person discussion, we think a reasonable approach is:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;upsert: true&lt;/li&gt;
	&lt;li&gt;require that there exists a unique index containing the fields of the uniqueKey
	&lt;ul&gt;
		&lt;li&gt;If the user drops the unique index during the aggregation, they&apos;re on their own&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;multi: false
	&lt;ul&gt;
		&lt;li&gt;Assume that at most one document will be updated&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I think it would be useful to push forward with this to have something working and see if the semantics are what we want. I&apos;ll also schedule time to discuss this more broadly with the team/product.&lt;/p&gt;</comment>
                            <comment id="1934290" author="kyle.suarez" created="Thu, 28 Jun 2018 20:50:55 +0000"  >&lt;p&gt;Let&apos;s use the update system to do this; ideally with upsert: &quot;true&quot;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="565393">SERVER-35893</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="570948">SERVER-36100</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="577003">SERVER-36318</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="580324">SERVER-36376</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="104998">SERVER-12280</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="585000">DOCS-11948</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                        <issuelink>
            <issuekey id="586805">SERVER-36598</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="565409">SERVER-35895</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="569811">SERVER-36047</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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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, 10 Jul 2018 13:48:55 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 27 weeks, 6 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-35893'>SERVER-35893</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-828</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>
                            5 years, 27 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kyle.suarez@mongodb.com</customfieldvalue>
            <customfieldvalue>nicholas.zolnierz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu1n0v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8rwf:</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="2404">Query 2018-07-16</customfieldvalue>
    <customfieldvalue id="2405">Query 2018-07-30</customfieldvalue>
    <customfieldvalue id="2440">Query 2018-08-13</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|hu19a7:</customfieldvalue>

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