<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:12:55 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>[CDRIVER-1573] Replace bulk_operation_update_with_opts()/bulk_operation_remove_with_opts() with bulk_operation_update_many_with_opts()/bulk_operation_remove_many_with_opts()</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1573</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;bulk_operation_remove_with_opts() has the awkward behavior that it will send an invalid operation to the server if the &quot;limit&quot; option is not specified.  Similarly, bulk_operation_update_with_opts() has the unintuitive behavior that it will perform a single-update unless the &quot;multi&quot; option is specified as true.&lt;/p&gt;

&lt;p&gt;These API functions should be removed and replaced with new API functions bulk_operation_remove_many_with_opts() and bulk_operation_update_many_with_opts().  Like their bulk_operation_*_one_with_opts() counterparts, these API functions should set the &quot;multi&quot; and &quot;limit&quot; options appropriately on the generated requests.&lt;/p&gt;</description>
                <environment></environment>
        <key id="320214">CDRIVER-1573</key>
            <summary>Replace bulk_operation_update_with_opts()/bulk_operation_remove_with_opts() with bulk_operation_update_many_with_opts()/bulk_operation_remove_many_with_opts()</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="bjori">Hannes Magnusson</assignee>
                                    <reporter username="rassi">J Rassi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Sep 2016 20:22:50 +0000</created>
                <updated>Wed, 19 Oct 2016 22:33:30 +0000</updated>
                            <resolved>Wed, 12 Oct 2016 18:31:14 +0000</resolved>
                                                    <fixVersion>1.5.0</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1406599" author="xgen-internal-githook" created="Wed, 12 Oct 2016 18:17:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1573&quot; title=&quot;Replace bulk_operation_update_with_opts()/bulk_operation_remove_with_opts() with bulk_operation_update_many_with_opts()/bulk_operation_remove_many_with_opts()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1573&quot;&gt;&lt;del&gt;CDRIVER-1573&lt;/del&gt;&lt;/a&gt; _many_with_opts must only allow multi=true/limit=0 or else error&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/6eb3667c42e295b72020103dbcb2c0a74d9a3799&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/6eb3667c42e295b72020103dbcb2c0a74d9a3799&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1406598" author="xgen-internal-githook" created="Wed, 12 Oct 2016 18:17:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1573&quot; title=&quot;Replace bulk_operation_update_with_opts()/bulk_operation_remove_with_opts() with bulk_operation_update_many_with_opts()/bulk_operation_remove_many_with_opts()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1573&quot;&gt;&lt;del&gt;CDRIVER-1573&lt;/del&gt;&lt;/a&gt; Rename bulk_operation_&lt;span class=&quot;error&quot;&gt;&amp;#91;update|remove&amp;#93;&lt;/span&gt;&lt;em&gt;with_opts to bulk_operation&lt;/em&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;update|remove&amp;#93;&lt;/span&gt;_many_with_opts&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/68283097da1f7efb887345f84f5fd7312a766bf0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/68283097da1f7efb887345f84f5fd7312a766bf0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1398186" author="jesse" created="Fri, 30 Sep 2016 21:40:24 +0000"  >&lt;p&gt;I think it&apos;s helpful for future users of the C Driver to have:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;mongoc_bulk_operation_remove_many_with_opts (this is a change)&lt;/li&gt;
	&lt;li&gt;mongoc_bulk_operation_remove_one_with_opts&lt;/li&gt;
	&lt;li&gt;mongoc_bulk_operation_replace_one_with_opts&lt;/li&gt;
	&lt;li&gt;mongoc_bulk_operation_update_many_with_opts (this is a change)&lt;/li&gt;
	&lt;li&gt;mongoc_bulk_operation_update_one_with_opts&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;My justification here is very similar to &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1525?focusedCommentId=1380174&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1380174&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;my justification in the original ticket&lt;/a&gt;: let&apos;s be more like the standard drivers. Being closer to the specs is better than being farther from the specs. Also, if this confused Rassi, imagine how easily we&apos;ll confuse users who aren&apos;t experts?&lt;/p&gt;

&lt;p&gt;It&apos;s not too late to change this at all! But it will be too late if we don&apos;t do it before we release 1.5.0. In C Driver 2.0 these will be the only bulk operation functions, so let&apos;s make them perfect now, and then we won&apos;t have to change them again later.&lt;/p&gt;

&lt;p&gt;More changes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;mongoc_bulk_operation_remove_many_with_opts must prohibit a &quot;limit&quot; option&lt;/li&gt;
	&lt;li&gt;mongoc_bulk_operation_remove_one_with_opts must prohibit a &quot;limit&quot; except for 1, and add &quot;limit: 1&quot; if there&apos;s no limit&lt;/li&gt;
	&lt;li&gt;mongoc_bulk_operation_replace_one_with_opts must prohibit a &quot;multi&quot; option except for &quot;false&quot;&lt;/li&gt;
	&lt;li&gt;mongoc_bulk_operation_update_many_with_opts must prohibit a &quot;multi&quot; option except for &quot;true&quot;, and add &quot;multi: true&quot; if there&apos;s no &quot;multi&quot;&lt;/li&gt;
	&lt;li&gt;mongoc_bulk_operation_update_one_with_opts  must prohibit a &quot;multi&quot; option except for &quot;false&quot;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1398120" author="bjori" created="Fri, 30 Sep 2016 20:45:05 +0000"  >&lt;p&gt;You are right that &lt;tt&gt;mongoc_bulk_operation_remove_with_opts&lt;/tt&gt; should set &lt;tt&gt;limit=0&lt;/tt&gt; if none was provided and &lt;tt&gt;mongoc_bulk_update_with_opts&lt;/tt&gt; should set multi=true if none provided. That makes sense and consistent with the existing functions.&lt;/p&gt;

&lt;p&gt;I don&apos;t agree with the renaming though. The &lt;tt&gt;_with_opts&lt;/tt&gt; functions are modelled after the current functions where by they do &quot;multi&quot; by default, and then there is a &lt;tt&gt;_one&lt;/tt&gt; variant of that function.&lt;br/&gt;
It maybe should be have &lt;tt&gt;_one&lt;/tt&gt; and &lt;tt&gt;_many&lt;/tt&gt; in the getgo, but I feel its to late the introduce those now &amp;#8211; what do you think &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;?&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="314581">CDRIVER-1525</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="319267">CXX-1052</issuekey>
        </issuelink>
                            </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsqco7:</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>