<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:10:12 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-656] Wrong error index with bulk write commands</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-656</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;With a unique index on &quot;a&quot;, do two operations in an ordered mongoc_bulk_operation_t:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;insert {&lt;tt&gt;&quot;a&quot;: 1&lt;/tt&gt;}&lt;/li&gt;
	&lt;li&gt;upsert with selector {&lt;tt&gt;&quot;b&quot;: 2&lt;/tt&gt;} and update-document {&lt;tt&gt;&quot;$set&quot;: {&quot;a&quot;: 1&lt;/tt&gt;}}&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The second operation fails because it violates the unique constraint on &quot;a&quot;. When mongoc_bulk_operation_execute uses OP_INSERT and OP_UPDATE it correctly fills the reply with:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;writeErrors: {[index: 1, code: 11000, errmsg: &quot;E11000 duplicate key error&quot;]}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;But if the bulk operation uses write commands, the error index is 0.&lt;/p&gt;</description>
                <environment></environment>
        <key id="204394">CDRIVER-656</key>
            <summary>Wrong error index with bulk write commands</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                    </labels>
                <created>Fri, 15 May 2015 05:56:41 +0000</created>
                <updated>Wed, 3 May 2017 22:14:19 +0000</updated>
                            <resolved>Tue, 16 Jun 2015 14:36:33 +0000</resolved>
                                                                    <component>Bulk API</component>
                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="941735" author="xgen-internal-githook" created="Tue, 16 Jun 2015 14:35:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: refactor write commands&lt;/p&gt;

&lt;p&gt;Send insert, update, and delete commands with the same function.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-648&quot; title=&quot;nInserted incremented despite error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-648&quot;&gt;&lt;del&gt;CDRIVER-648&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-654&quot; title=&quot;Ordered bulk insert continues past oversized doc&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-654&quot;&gt;&lt;del&gt;CDRIVER-654&lt;/del&gt;&lt;/a&gt;, and &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-656&quot; title=&quot;Wrong error index with bulk write commands&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-656&quot;&gt;&lt;del&gt;CDRIVER-656&lt;/del&gt;&lt;/a&gt; are resolved in this commit&lt;br/&gt;
or recent commits.&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/45cb98a160e17cbec4bb7a5a31a46722a87641e6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/45cb98a160e17cbec4bb7a5a31a46722a87641e6&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <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|hremfz:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="579">C Driver 2015Q2 sprint 3</customfieldvalue>

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