<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:04:40 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-4004] Bulk Upsert</title>
                <link>https://jira.mongodb.org/browse/SERVER-4004</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When presented with a mix of new documents and existing documents which may have been modified it would be nice to have a bulk upsert.  This would potentially save a great deal of time.  The current work-around is to partition the documents into existing and new and then insert the new and update each existing document.&lt;/p&gt;

&lt;p&gt;When there are a significant number of existing documents this is unnecessarily time consuming.&lt;/p&gt;</description>
                <environment></environment>
        <key id="23169">SERVER-4004</key>
            <summary>Bulk Upsert</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="9">Done</resolution>
                                        <assignee username="greg_10gen">Greg Studer</assignee>
                                    <reporter username="leakybucket">Glen Holcomb</reporter>
                        <labels>
                            <label>performance</label>
                    </labels>
                <created>Mon, 3 Oct 2011 19:55:31 +0000</created>
                <updated>Mon, 15 May 2017 16:03:53 +0000</updated>
                            <resolved>Wed, 8 Jan 2014 17:20:12 +0000</resolved>
                                    <version>2.0.0</version>
                                    <fixVersion>2.5.5</fixVersion>
                                    <component>Performance</component>
                    <component>Usability</component>
                    <component>Write Ops</component>
                                        <votes>37</votes>
                                    <watches>30</watches>
                                                                                                                <comments>
                            <comment id="449684" author="alerner" created="Thu, 31 Oct 2013 19:46:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=eliot&quot; class=&quot;user-hover&quot; rel=&quot;eliot&quot;&gt;eliot&lt;/a&gt; Is this any different than updates with write commands? Any changes in the shell?&lt;/p&gt;</comment>
                            <comment id="275276" author="justanyone" created="Mon, 25 Feb 2013 16:12:59 +0000"  >&lt;p&gt;[ Adding same comment here as to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2172&quot; title=&quot;Support Batching Mixed Operations Against Same Collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2172&quot;&gt;SERVER-2172&lt;/a&gt; ]&lt;/p&gt;

&lt;p&gt;I&apos;m issuing thousands of update statements a second. I would like to send them as a list of updates rather than do them one by one, with the latency involved in that.&lt;/p&gt;

&lt;p&gt;Currently there is support for batch inserts. This feature may tie-in with that functionality.&lt;/p&gt;

&lt;p&gt;Playing devil&apos;s advocate to my own argument, I can see a possible complication. I have a sharded, replicated collection. So, let&apos;s say I send in a list of updates (each of a single separate document indexed by _id). The router (mongos) would have to split the updates to separate lists to go to their respective shards.&lt;/p&gt;

&lt;p&gt;Other than that, it seems a straightforward performance increaser.&lt;/p&gt;

&lt;p&gt;Re: failures, handle it the same as batch inserts, insert all possible records/documents and return data on which ones failed, or whatever is the easiest functionality to implement and I&apos;ll cope with the downsides.&lt;/p&gt;</comment>
                            <comment id="220376" author="scriby" created="Thu, 20 Dec 2012 15:48:53 +0000"  >&lt;p&gt;+1 - This would be helpful for writing scripts to upgrade data in large tables. Specifically, in cases where a simple update script won&apos;t suffice, and we can&apos;t use server-side javascript due to sharding and availability concerns.&lt;/p&gt;</comment>
                            <comment id="180854" author="dstorrs" created="Wed, 31 Oct 2012 09:07:59 +0000"  >&lt;p&gt;Thanks Eliot, I&apos;ll run the benchmarks again.  As you guessed, the prior time I was still on 2.0.&lt;/p&gt;</comment>
                            <comment id="180831" author="eliot" created="Wed, 31 Oct 2012 07:06:02 +0000"  >&lt;p&gt;david - you should try findAndModify in 2.2&lt;br/&gt;
Should be a lot faster.&lt;/p&gt;</comment>
                            <comment id="180830" author="dstorrs" created="Wed, 31 Oct 2012 07:04:12 +0000"  >&lt;p&gt;@Travis Krick:  Another reason not to use FindAndModify is that it&apos;s ~100x slower than update. (According to benchmarks I ran; standard issues with other people&apos;s benchmarks apply, of course.)&lt;/p&gt;</comment>
                            <comment id="180797" author="tkrick" created="Wed, 31 Oct 2012 03:06:13 +0000"  >&lt;p&gt;My application would also make good use of a bulk/batch upsert. Agreed, less than desirable code to work around this.  FindAndModify isn&apos;t sufficient because I want to modify the matching documents each in its own different way.&lt;/p&gt;</comment>
                            <comment id="146418" author="dstorrs" created="Tue, 24 Jul 2012 02:39:48 +0000"  >&lt;p&gt;Please add this.  The amount of work and database thrashing that we have to go through to work around it is substantial.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="13848">SERVER-2172</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="69163">SERVER-9038</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="55353">SERVER-7563</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="13848">SERVER-2172</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 24 Jul 2012 02:39:48 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 15 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alerner</customfieldvalue>
            <customfieldvalue>scriby</customfieldvalue>
            <customfieldvalue>dstorrs</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>leakybucket</customfieldvalue>
            <customfieldvalue>greg_10gen</customfieldvalue>
            <customfieldvalue>justanyone</customfieldvalue>
            <customfieldvalue>tkrick</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroowv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrg7pr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8155</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>
                                

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

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