<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:13:36 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-1916] bson_iter_init_find() and bson_iter_init_find_case() should return false only when iterator is successfully exhausted and key not found</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1916</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;bson_iter_init_find() and bson_iter_init_find_case() are currently documented to return false in either of the following two circumstances:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Iterator initialization fails.&lt;/li&gt;
	&lt;li&gt;The iterator was successfully exhausted and the requested key was not found.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Because of this ambiguity, it is not currently clear whether or not a consumer of this API should propagate an error up the call stack when it receives a false return value from one of these two functions.&lt;/p&gt;

&lt;p&gt;Instead, these API functions should BSON_ASSERT() that iterator initialization was successful, and their documentation should be updated to reflect that they will never return an error.&lt;/p&gt;

&lt;p&gt;See also my &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-1066?focusedCommentId=1426796&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1426796&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;comment at CXX-1066&lt;/a&gt; for further discussion.&lt;/p&gt;</description>
                <environment></environment>
        <key id="331371">CDRIVER-1916</key>
            <summary>bson_iter_init_find() and bson_iter_init_find_case() should return false only when iterator is successfully exhausted and key not found</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="rassi">J Rassi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 Nov 2016 21:39:23 +0000</created>
                <updated>Fri, 13 Jan 2017 20:16:50 +0000</updated>
                            <resolved>Fri, 13 Jan 2017 20:16:50 +0000</resolved>
                                                    <fixVersion>1.6.0</fixVersion>
                                    <component>libbson</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1476663" author="jesse" created="Fri, 13 Jan 2017 20:16:50 +0000"  >&lt;p&gt;After discussion w/ David we&apos;re saying it&apos;s not worth changing the function to abort if the bson_t is invalid. It is reasonable to require users to pass a valid bson_t to the function if they want unambiguous behavior. The documentation already accurately describes the (ambiguous) behavior:&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;This function is identical to (bson_iter_init() &amp;amp;&amp;amp; bson_iter_find()).&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;Users who need to distinguish between bson_iter_init failing vs. bson_iter_find failing can call them separately.&lt;/p&gt;

&lt;p&gt;So there&apos;s nothing to do here.&lt;/p&gt;</comment>
                            <comment id="1476605" author="david.golden" created="Fri, 13 Jan 2017 19:07:09 +0000"  >&lt;p&gt;I believe what we want is this:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;BSON_ASSERT() that iterator initialization was successful&lt;/li&gt;
	&lt;li&gt;Return a boolean with the result of the find&lt;/li&gt;
	&lt;li&gt;Update docs to reflect that&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1476575" author="jesse" created="Fri, 13 Jan 2017 18:44:15 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt; or &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rassi&quot; class=&quot;user-hover&quot; rel=&quot;rassi&quot;&gt;rassi&lt;/a&gt; would you be willing to write in this ticket what doc change is required for this ticket to be closed, please?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="320711">CXX-1066</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|hrbol3:</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="1301">C Driver 2016 sprint 9</customfieldvalue>
    <customfieldvalue id="1481">C Driver 2017 1 - Jan 20, 2017</customfieldvalue>

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