<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:15:17 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-2462] Don&apos;t return null from mongoc_collection_find_indexes</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-2462</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;Generally, when a function can return a mongoc_cursor_t, it should &lt;b&gt;always&lt;/b&gt; return a mongoc_cursor_t, never NULL. On error, the function should set the cursor&apos;s error, and return the cursor.&lt;/p&gt;

&lt;p&gt;The old function mongoc_collection_find_indexes was implemented incorrectly, it can return NULL on error.&lt;/p&gt;

&lt;p&gt;I implemented a new function, mongoc_collection_find_indexes_with_opts, which behaves the way we want: it always returns a cursor, never NULL.&lt;/p&gt;

&lt;p&gt;I then rewrote the old mongoc_collection_find_indexes to use the new function mongoc_collection_find_indexes_with_opts, but I preserved the bad old behavior: the old function returns NULL on error.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=acm&quot; class=&quot;user-hover&quot; rel=&quot;acm&quot;&gt;acm&lt;/a&gt; convinced me that it&apos;s ok to fix the old function mongoc_collection_find_indexes, so that it never returns NULL. This is an API change, but it is &lt;b&gt;not&lt;/b&gt; an API break. If a user&apos;s application was written for the old API, it must check that the cursor is not NULL, and also check if &lt;tt&gt;mongoc_cursor_error (cursor, &amp;amp;error);&lt;/tt&gt; returns true. We can update the old function so it never returns NULL, and a user&apos;s application will still work correctly without changes.&lt;/p&gt;

&lt;p&gt;So, don&apos;t return NULL, and update any tests that must change to verify the desired new behavior. Check the documentation and see if it requires an update.&lt;/p&gt;</description>
                <environment></environment>
        <key id="481832">CDRIVER-2462</key>
            <summary>Don&apos;t return null from mongoc_collection_find_indexes</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="13201">Fixed</resolution>
                                        <assignee username="xiangyu.yao@mongodb.com">Xiangyu Yao</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Jan 2018 16:54:36 +0000</created>
                <updated>Sat, 28 Oct 2023 11:30:11 +0000</updated>
                            <resolved>Thu, 25 Jan 2018 20:38:11 +0000</resolved>
                                                    <fixVersion>1.10.0</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1785302" author="xgen-internal-githook" created="Thu, 25 Jan 2018 20:37:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Xiangyu Yao&apos;, &apos;email&apos;: &apos;xiangyu.yao24@gmail.com&apos;, &apos;username&apos;: &apos;xy24&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2462&quot; title=&quot;Don&amp;#39;t return null from mongoc_collection_find_indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2462&quot;&gt;&lt;del&gt;CDRIVER-2462&lt;/del&gt;&lt;/a&gt; mongoc_collection_find_indexes won&apos;t return null&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/ee6f975e6111675bfed3f780eb86502c5b86e0e8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/ee6f975e6111675bfed3f780eb86502c5b86e0e8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1785090" author="xiangyu.yao" created="Thu, 25 Jan 2018 18:26:56 +0000"  >&lt;p&gt;code review url: &lt;a href=&quot;https://mongodbcr.appspot.com/178610001/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/178610001/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htfbrr:</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>