<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:10:57 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-901] _mongoc_write_result_complete() does not populate bson_error_t from write concern errors</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-901</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;With &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-710&quot; title=&quot;Wrong writeConcernErrors format&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-710&quot;&gt;&lt;del&gt;CDRIVER-710&lt;/del&gt;&lt;/a&gt;, &lt;tt&gt;mongoc_write_result_t&lt;/tt&gt; now stores an array of &lt;tt&gt;writeConcernErrors&lt;/tt&gt;. As I was updating PHPC for this API change, I traced how write concern errors are reported, since we need to turn those &lt;tt&gt;bson_error_t&lt;/tt&gt; output variables into exceptions.&lt;/p&gt;

&lt;p&gt;I traced the logic from &lt;tt&gt;mongoc_bulk_operation_execute()&lt;/tt&gt; through to &lt;tt&gt;_mongoc_write_result_complete()&lt;/tt&gt; and it appears that the &lt;tt&gt;bson_error_t&lt;/tt&gt; is only ever set from write errors; however, the function may still return false for either &lt;tt&gt;!result-&amp;gt;failed&lt;/tt&gt; or &lt;tt&gt;bson_empty0 (&amp;amp;result-&amp;gt;writeConcernErrors)&lt;/tt&gt; (which is equivalent to checking for a non-zero &lt;tt&gt;result.n_writeConcernErrors&lt;/tt&gt; value).&lt;/p&gt;

&lt;p&gt;I can&apos;t speak for the &lt;tt&gt;!result-&amp;gt;failed&lt;/tt&gt; case, but I believe we want to integrate &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.1.8/src/mongo/s/write_ops/batch_write_op.cpp#L754-l776&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongos&apos; write concern error merging logic&lt;/a&gt; here, which I would otherwise need to do in &lt;a href=&quot;https://jira.mongodb.org/browse/PHPC-434&quot; title=&quot;WriteResult should merge multiple write concern errors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PHPC-434&quot;&gt;&lt;del&gt;PHPC-434&lt;/del&gt;&lt;/a&gt; and HHVM-112.&lt;/p&gt;</description>
                <environment></environment>
        <key id="232447">CDRIVER-901</key>
            <summary>_mongoc_write_result_complete() does not populate bson_error_t from write concern errors</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="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Oct 2015 20:34:27 +0000</created>
                <updated>Wed, 19 Oct 2016 14:15:17 +0000</updated>
                            <resolved>Tue, 6 Oct 2015 18:39:56 +0000</resolved>
                                    <version>1.2-rc0</version>
                                    <fixVersion>1.2.0</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1052828" author="xgen-internal-githook" created="Tue, 6 Oct 2015 18:39:39 +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: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-901&quot; title=&quot;_mongoc_write_result_complete() does not populate bson_error_t from write concern errors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-901&quot;&gt;&lt;del&gt;CDRIVER-901&lt;/del&gt;&lt;/a&gt; document bulk write error domains&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/f880d1911e0976e05b232cca777a8920e7d7e237&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/f880d1911e0976e05b232cca777a8920e7d7e237&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1052827" author="xgen-internal-githook" created="Tue, 6 Oct 2015 18:39:38 +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: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-901&quot; title=&quot;_mongoc_write_result_complete() does not populate bson_error_t from write concern errors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-901&quot;&gt;&lt;del&gt;CDRIVER-901&lt;/del&gt;&lt;/a&gt; update bson_error_t from write concern err&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/5ea44ed8c59eaf20120e173144f8691d86ce5c3d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/5ea44ed8c59eaf20120e173144f8691d86ce5c3d&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="232427">PHPC-434</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="211437">CDRIVER-710</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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|hsdgd3:</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="741">C Driver 2015Q2 sprint 8</customfieldvalue>

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