<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:21: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>[DRIVERS-224] Implement findAndModify writeConcern support</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-224</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;The &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.rst#find-and-modify&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Write Concern&lt;/a&gt; specification details the specifics of adding write concern to your driver for &lt;tt&gt;findAndModify&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;In short, when talking with server 3.2 or greater (maxWireVersion &amp;gt;=4), writeConcern should be added to the &lt;tt&gt;findAndModify&lt;/tt&gt; command used from the CRUD spec helper methods &lt;tt&gt;findOneAndUpdate&lt;/tt&gt;, &lt;tt&gt;findOneAndReplace&lt;/tt&gt;, and &lt;tt&gt;findOneAndDelete&lt;/tt&gt;.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;ImportantNote%3A&quot;&gt;&lt;/a&gt;Important Note:&lt;/h4&gt;

&lt;p&gt;When the &lt;tt&gt;writeConcern&lt;/tt&gt; on &lt;tt&gt;findAndModify&lt;/tt&gt; fails, the resulting document still comes back with &lt;tt&gt;ok: 1&lt;/tt&gt;. This is the same as the write commands. Hence, to check for write concern and raise the appropriate error to your users, you will need to check the resulting document for a writeConcernError field. If it is present, then &lt;tt&gt;writeConcern&lt;/tt&gt; failed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="199674">DRIVERS-224</key>
            <summary>Implement findAndModify writeConcern support</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="barrie">Barrie Segal</assignee>
                                    <reporter username="david.golden@mongodb.com">David Golden</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Apr 2015 20:23:52 +0000</created>
                <updated>Mon, 15 Apr 2019 17:28:44 +0000</updated>
                            <resolved>Tue, 21 Jun 2016 18:24:39 +0000</resolved>
                                                                            <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="1090608" author="acm" created="Tue, 17 Nov 2015 16:30:11 +0000"  >&lt;p&gt;C++11 driver supports this only by changing the write concern at the collection level.&lt;/p&gt;</comment>
                            <comment id="895655" author="jesse" created="Wed, 22 Apr 2015 22:33:52 +0000"  >&lt;p&gt;Got it. My druthers: bump the wire protocol version on the server side so we can detect whether findAndModify&apos;s write concern is honored or not, then raise error from the driver if user sends an explicit writeConcern with findAndModify on a pre-3.1 server. Better to raise an informative error than to silently ignore the user&apos;s desire for a certain level of durability to be acknowledged.&lt;/p&gt;</comment>
                            <comment id="895604" author="behackett" created="Wed, 22 Apr 2015 21:50:29 +0000"  >&lt;p&gt;It doesn&apos;t look like older server versions raise when writeConcern is passed. I just tried this on 2.2.&lt;/p&gt;</comment>
                            <comment id="895520" author="jesse" created="Wed, 22 Apr 2015 20:39:10 +0000"  >&lt;p&gt;Server behavior &lt;b&gt;does&lt;/b&gt; change when we release new versions. For example, the aggregation framework didn&apos;t exist before 2.2. The &quot;aggregate&quot; helper method throws an error on server versions that don&apos;t support it.&lt;/p&gt;

&lt;p&gt;Some driver architectures would make the emulation you propose very complex to implement for tiny benefit, if any. Better to specify that we throw an error if the user passes an explicit write concern to findAndModify on a server version that doesn&apos;t support it.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="233076">CSHARP-1437</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="232902">CXX-692</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="232903">CXX-693</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="84206">JAVA-908</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="232905">PHPLIB-129</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="229329">PYTHON-989</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="231598">RUBY-1037</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="668380">RUST-20</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="227806">NODE-549</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="205778">DRIVERS-232</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="227996">CDRIVER-824</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="45094">SERVER-6558</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_23952" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Driver Compliance</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<style type='text/css'>
         #scriptField, #scriptField *{
                border: 1px solid black;
            }

            #scriptField{
                border-collapse: collapse;
            }

            #scriptField td {
                text-align: center; /* Center-align text in table cells */
            }

            #scriptField td.key {
                text-align: left; /* Left-align text in the Key column */
            }

            #scriptField a {
                text-decoration: none; /* Remove underlines from links */
                border: none; /* Remove border from links */
            }
            
            /* Add green background color to cells with FixVersion */
            #scriptField td.hasFixVersion {
                background-color: #00FF00; /* Green color code */
            }

            /* Center-align the first row headers */
            #scriptField th {
                text-align: center;
            }
        </style>
<table id='scriptField'>
  <tr>
    <th>Key</th>
    <th>Status/Resolution</th>
    <th>FixVersion</th>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/NODE-549'>NODE-549</a>
    </td>
    <td>Done</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PYTHON-989'>PYTHON-989</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>3.2</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUBY-1037'>RUBY-1037</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>2.2.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/JAVA-908'>JAVA-908</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>2.14.0, 3.2.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PERL-564'>PERL-564</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>1.2.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/SCALA-213'>SCALA-213</a>
    </td>
    <td>Won't Fix</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PHPLIB-129'>PHPLIB-129</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>1.0.0-beta2</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CXX-692'>CXX-692</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>legacy-1.1.0-rc0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CXX-693'>CXX-693</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>3.0.0-rc0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CSHARP-1437'>CSHARP-1437</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>1.11, 2.2</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PERL-597'>PERL-597</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>1.2.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUST-20'>RUST-20</a>
    </td>
    <td>Duplicate</td>
    <td class=''></td>
  </tr>
</table>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-112</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs8o9z:</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_11150" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>SERVER fixVersion</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="12551"><![CDATA[3.2]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>