<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:09:02 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-295] Allow access to getLastError document</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-295</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;There is no way to access the getLastError document, since it&apos;s being received, evaluated and then discarded right after _mongoc_write_concern_has_gle().&lt;/p&gt;

&lt;p&gt;So, clients can&apos;t access the rest of the fields to evaluate for example, how many documents were affected by the previous update/delete operation, or whether an upsert resulted in an update or an insert, besides other useful fields I&apos;ve seen there.&lt;/p&gt;</description>
                <environment>Any</environment>
        <key id="120127">CDRIVER-295</key>
            <summary>Allow access to getLastError document</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="-1">Unassigned</assignee>
                                    <reporter username="maganap">Maga Napanga</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Thu, 13 Mar 2014 12:05:02 +0000</created>
                <updated>Wed, 3 May 2017 22:14:21 +0000</updated>
                            <resolved>Thu, 13 Mar 2014 19:56:09 +0000</resolved>
                                    <version>0.90.0</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="515611" author="maganap" created="Thu, 13 Mar 2014 20:35:41 +0000"  >&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;I&apos;m glad it was useful, although you had to fix my fixes... lol&lt;br/&gt;
I was planning to use my patch because I needed this feature, but with your fix it&apos;s now great.&lt;/p&gt;

&lt;p&gt;Thanks for taking care of this so quickly  &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="515560" author="christian.hergert@10gen.com" created="Thu, 13 Mar 2014 19:56:09 +0000"  >&lt;p&gt;This is now in mongo-c-driver master. See the following for a follow up commit that changes the semantics a bit from your original patch.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/b04fd6722cec92aa30288344f7cf5bfff03bd0a5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/b04fd6722cec92aa30288344f7cf5bfff03bd0a5&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks again!&lt;/p&gt;

&lt;p&gt;&amp;#8211; Christian&lt;/p&gt;</comment>
                            <comment id="515511" author="christian.hergert@10gen.com" created="Thu, 13 Mar 2014 19:18:27 +0000"  >&lt;p&gt;One thing I think we can do, however, is to keep the mongoc_client_* methods keep mongoc_client_t as the first parameter. We can add an out parameter for the GLE response, which can then be stored by the caller (in this case, mongoc_collection_t).&lt;/p&gt;

&lt;p&gt;Either way, I&apos;ll bring in this commit, and massage it a bit.&lt;/p&gt;</comment>
                            <comment id="515495" author="christian.hergert@10gen.com" created="Thu, 13 Mar 2014 19:09:14 +0000"  >&lt;p&gt;Hi Maga,&lt;/p&gt;

&lt;p&gt;Thanks for working on this!&lt;/p&gt;

&lt;p&gt;I think the important thing is that we document the necessity of the last command sending a write concern that would result in a GLE (which it looks likve you&apos;ve done on the patch). We should probably also clear the GLE if a command such as OP_INSERT/etc has been dispatched since without a GLE.&lt;/p&gt;

&lt;p&gt;The patch you&apos;ve put together on github looks quite comprehensive, thanks for catching up with the codebase so quick!&lt;/p&gt;

&lt;p&gt;&amp;#8211; Christian&lt;/p&gt;</comment>
                            <comment id="515167" author="maganap" created="Thu, 13 Mar 2014 14:16:34 +0000"  >&lt;p&gt;Would it be acceptable to add:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;bson_t *gle;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;to &lt;tt&gt;_mongoc_collection_t()&lt;/tt&gt; ?&lt;/p&gt;

&lt;p&gt;If so:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;init in &lt;tt&gt;_mongoc_collection_new()&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;copy from &lt;tt&gt;&amp;amp;b&lt;/tt&gt; and &lt;tt&gt;&amp;amp;reply_bson&lt;/tt&gt; after &lt;tt&gt;_mongoc_write_concern_has_gle()&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;clear in &lt;tt&gt;mongoc_collection_destroy()&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I could work on that if it sounds good to you.&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|hrwq3b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>105023</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>