<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:18:30 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-3595] find_and_modify has extraneous checks for write concern inheritance</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3595</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;As discovered by &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andreas.braun&quot; class=&quot;user-hover&quot; rel=&quot;andreas.braun&quot;&gt;andreas.braun&lt;/a&gt; as part of &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3552&quot; title=&quot;Allow hinting the delete command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3552&quot;&gt;&lt;del&gt;CDRIVER-3552&lt;/del&gt;&lt;/a&gt;, the logic for checking whether inheriting a write concern is permissible in&#160;&lt;tt&gt;mongoc_collection_find_and_modify_with_opts&lt;/tt&gt;&#160;is confusing.&lt;/p&gt;

&lt;p&gt;1. Write concern is not inherited from the collection if it is unacknowledged.&lt;/p&gt;

&lt;p&gt;Being unacknowledged should not prevent it from being inherited. It&apos;s possible the call to &lt;tt&gt;mongoc_write_concern_is_acknowledged&lt;/tt&gt; was mistaken for &lt;tt&gt;mongoc_write_concern_is_default&lt;/tt&gt; and that the intent was not to inherit the default write concern.&lt;/p&gt;

&lt;p&gt;2. An acknowledged write concern is inherited from the collection and applied to an operation within a transaction&lt;/p&gt;

&lt;p&gt;But transactions should not be inheriting write concerns from the collection.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1296898">CDRIVER-3595</key>
            <summary>find_and_modify has extraneous checks for write concern inheritance</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="andrew.witten@mongodb.com">Andrew Witten</assignee>
                                    <reporter username="kevin.albertson@mongodb.com">Kevin Albertson</reporter>
                        <labels>
                    </labels>
                <created>Mon, 30 Mar 2020 16:00:08 +0000</created>
                <updated>Sat, 28 Oct 2023 11:28:50 +0000</updated>
                            <resolved>Fri, 17 Jul 2020 01:30:27 +0000</resolved>
                                                    <fixVersion>1.18.0</fixVersion>
                    <fixVersion>1.18.0-alpha</fixVersion>
                                    <component>libmongoc</component>
                    <component>Transactions</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3289011" author="xgen-internal-githook" created="Fri, 17 Jul 2020 01:17:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Witten&apos;, &apos;email&apos;: &apos;andrew.witten@mongodb.com&apos;, &apos;username&apos;: &apos;awitten1&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3595&quot; title=&quot;find_and_modify has extraneous checks for write concern inheritance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3595&quot;&gt;&lt;del&gt;CDRIVER-3595&lt;/del&gt;&lt;/a&gt; adds tests, removes extraneous check&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3595&quot; title=&quot;find_and_modify has extraneous checks for write concern inheritance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3595&quot;&gt;&lt;del&gt;CDRIVER-3595&lt;/del&gt;&lt;/a&gt; adds tests, removes extraneous check&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3595&quot; title=&quot;find_and_modify has extraneous checks for write concern inheritance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3595&quot;&gt;&lt;del&gt;CDRIVER-3595&lt;/del&gt;&lt;/a&gt; fixed memory leak&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3595&quot; title=&quot;find_and_modify has extraneous checks for write concern inheritance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3595&quot;&gt;&lt;del&gt;CDRIVER-3595&lt;/del&gt;&lt;/a&gt; skip test if wire version is too low&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3595&quot; title=&quot;find_and_modify has extraneous checks for write concern inheritance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3595&quot;&gt;&lt;del&gt;CDRIVER-3595&lt;/del&gt;&lt;/a&gt; adds test case inheriting lsid and wc&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;changed comment&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3595&quot; title=&quot;find_and_modify has extraneous checks for write concern inheritance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3595&quot;&gt;&lt;del&gt;CDRIVER-3595&lt;/del&gt;&lt;/a&gt; refactored tests&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3595&quot; title=&quot;find_and_modify has extraneous checks for write concern inheritance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3595&quot;&gt;&lt;del&gt;CDRIVER-3595&lt;/del&gt;&lt;/a&gt; minor changes&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3595&quot; title=&quot;find_and_modify has extraneous checks for write concern inheritance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3595&quot;&gt;&lt;del&gt;CDRIVER-3595&lt;/del&gt;&lt;/a&gt; changed else if into else&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/a8bb97bcdbe36048ac44fe3a572be071fabc12cd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/a8bb97bcdbe36048ac44fe3a572be071fabc12cd&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="3281509" author="JIRAUSER1253381" created="Sun, 12 Jul 2020 22:39:45 +0000"  >&lt;p&gt;PR:&#160;&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/pull/660&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/pull/660&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3205826" author="kevin.albertson" created="Thu, 11 Jun 2020 19:03:24 +0000"  >&lt;p&gt;The first point might not be an issue, since the server ignores unacknowledged anyways according to &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jmikola&quot; class=&quot;user-hover&quot; rel=&quot;jmikola&quot;&gt;jmikola&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But the second point is something we should definitely address if that is an issue.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10220">
                    <name>Tested</name>
                                            <outwardlinks description="tested by">
                                        <issuelink>
            <issuekey id="885221">CDRIVER-3273</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|hw8fsv:</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>