<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:12:48 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-1526] Rename &quot;_with_write_concern&quot; functions to &quot;_with_opts&quot;</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1526</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;Rename &quot;_with_write_concern&quot; functions (introduced in &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1322&quot; title=&quot;Support sending writeConcern for commands that write&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1322&quot;&gt;&lt;del&gt;CDRIVER-1322&lt;/del&gt;&lt;/a&gt;) to &quot;_with_opts&quot;, accept a const bson_t opts instead a mongoc_write_concern_t:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;del&gt;mongoc_collection_aggregate_with_opts&lt;/del&gt; &lt;tt&gt;mongoc_collection_aggregate&lt;/tt&gt; already has &lt;tt&gt;bson_t *options&lt;/tt&gt; that be retrofitted&lt;/li&gt;
	&lt;li&gt;mongoc_collection_create_index_with_opts&lt;/li&gt;
	&lt;li&gt;mongoc_collection_drop_index_with_opts&lt;/li&gt;
	&lt;li&gt;mongoc_collection_drop_with_opts&lt;/li&gt;
	&lt;li&gt;mongoc_collection_rename_with_opts&lt;/li&gt;
	&lt;li&gt;&lt;del&gt;mongoc_database_create_collection_with_opts&lt;/del&gt; &lt;tt&gt;mongoc_database_create_collection&lt;/tt&gt; already has &lt;tt&gt;bson_t *options&lt;/tt&gt; that can be retrofitted&lt;/li&gt;
	&lt;li&gt;mongoc_database_drop_with_opts&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;For consistency with the rest of our API, the final parameters of each of these functions should be ordered like:&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;   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;   const bson_t *opts&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;   bson_error_t *error&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;Or:&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;   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;   const bson_t *opts&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;   bson_t *reply&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;   bson_error_t *error&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;Their internal helper _mongoc_client_command_with_write_concern should become:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;_mongoc_client_command_with_opts&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This function accepts a const bson_t &quot;opts&quot; instead of a mongoc_write_concern_t. Users can easily pass us a mongoc_write_concern_t in &quot;opts&quot; using mongoc_write_concern_append. The same rules currently enforced by _mongoc_client_command_with_write_concern MUST be enforced by the new _mongoc_client_command_with_opts:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;If &quot;opts&quot; has a &quot;writeConcern&quot; subdocument, append it to the command iff max wire version &amp;gt;= 5&lt;/li&gt;
	&lt;li&gt;If &quot;opts&quot; has a &quot;writeConcern&quot; subdocument, parse the reply for &quot;writeConcernError&quot; and return false if there is a write concern error&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Besides &quot;writeConcern&quot;, I think other fields in &quot;opts&quot; are appended to the command without any validation.&lt;/p&gt;</description>
                <environment></environment>
        <key id="314583">CDRIVER-1526</key>
            <summary>Rename &quot;_with_write_concern&quot; functions to &quot;_with_opts&quot;</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="bjori">Hannes Magnusson</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Sep 2016 13:11:57 +0000</created>
                <updated>Sat, 2 Jun 2018 11:07:29 +0000</updated>
                            <resolved>Tue, 13 Sep 2016 21:11:23 +0000</resolved>
                                    <version>1.5.0</version>
                                    <fixVersion>1.5.0</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1383789" author="xgen-internal-githook" created="Tue, 13 Sep 2016 21:11:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1526&quot; title=&quot;Rename &amp;quot;_with_write_concern&amp;quot; functions to &amp;quot;_with_opts&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1526&quot;&gt;&lt;del&gt;CDRIVER-1526&lt;/del&gt;&lt;/a&gt; Rewrite &quot;_with_write_concern&quot; functions to &quot;_with_opts&quot;&lt;/p&gt;

&lt;p&gt;These function now take a generic bson_t options, which can contain&lt;br/&gt;
whichever options or arguments to the command.&lt;/p&gt;

&lt;p&gt;To add write_concern to the these commands, add it to the generic opts&lt;br/&gt;
with:&lt;br/&gt;
mongoc_write_concern_append (wc, opts);&lt;br/&gt;
And pass opts to the function.&lt;/p&gt;

&lt;p&gt;Removed&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;mongoc_collection_aggregate_with_opts&lt;/li&gt;
	&lt;li&gt;mongoc_database_create_collection_with_opts&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Their respective function without _with_opts had opts parameter that&lt;br/&gt;
was retrofitted to support writeConcern and other arbitrary options&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/279c7fe7fbc4309d727d9762014e6aa49483d19e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/279c7fe7fbc4309d727d9762014e6aa49483d19e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1383521" author="bjori" created="Tue, 13 Sep 2016 17:55:03 +0000"  >&lt;p&gt;&lt;a href=&quot;https://mongodbcr.appspot.com/98200001/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/98200001/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="293112">CDRIVER-1322</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                        <issuelink>
            <issuekey id="553432">CDRIVER-2679</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CDRIVER-1524</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hspi5j:</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>