<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:24:15 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-1899] Write results should be optional to accommodate unacknowledged write concerns</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-1899</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #fafbfc;border-color: #21313c;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #fafbfc;&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#write-results&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Write Results&lt;/a&gt; states that the &lt;tt&gt;acknowledged&lt;/tt&gt; property on result objects exists for languages that do not return an optional type. This implies that those write methods should actually be documented as returning an optional (e.g. &lt;tt&gt;bulkWrite&lt;/tt&gt; should return &lt;tt&gt;Optional&amp;lt;BulkWriteResult&amp;gt;&lt;/tt&gt;). Note that &lt;tt&gt;findAndModify&lt;/tt&gt; operations may need similar clarifications (permitting an optional or null return value), as the spec currently documents those methods are returning a non-optional Document (&lt;tt&gt;findAndModify&lt;/tt&gt; with {&lt;tt&gt;w:0&lt;/tt&gt;} comes back with a {&lt;tt&gt;ok:1&lt;/tt&gt;} response and would not have any document to return).&lt;/p&gt;

&lt;p&gt;This came up while working on &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-1340&quot; title=&quot;Allow hint for unacknowledged writes using OP_MSG when supported by the server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-1340&quot;&gt;DRIVERS-1340&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Motivation&quot;&gt;&lt;/a&gt;&lt;b&gt;Motivation&lt;/b&gt;&lt;/h3&gt;
&lt;h4&gt;&lt;a name=&quot;Whoistheaffectedenduser%3F&quot;&gt;&lt;/a&gt;Who is the affected end user?&lt;/h4&gt;

&lt;p&gt;Driver authors. This ticket is strictly a clarification and should have no impact on driver APIs or users.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Isthisissueurgent%3F&quot;&gt;&lt;/a&gt;Is this issue urgent?&lt;/h4&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Isthisticketrequiredbyadownstreamteam%3F&quot;&gt;&lt;/a&gt;Is this ticket required by a downstream team?&lt;/h4&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Isthisticketonlyfortests%3F&quot;&gt;&lt;/a&gt;Is this ticket only for tests?&lt;/h4&gt;

&lt;p&gt;No. This ticket only pertains to the spec language. Any unified tests that do assert results for unacknowledged writes should utilize &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.rst#unsetormatches&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$unsetOrMatches&lt;/tt&gt;&lt;/a&gt; on the expected result.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="1860822">DRIVERS-1899</key>
            <summary>Write results should be optional to accommodate unacknowledged write concerns</summary>
                <type id="14901" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14700&amp;avatarType=issuetype">Spec Change</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="jmikola@mongodb.com">Jeremy Mikola</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Aug 2021 15:54:07 +0000</created>
                <updated>Sat, 28 Oct 2023 10:44:38 +0000</updated>
                            <resolved>Fri, 28 Jan 2022 17:17:02 +0000</resolved>
                                                        <component>CRUD</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4321504" author="xgen-internal-githook" created="Fri, 28 Jan 2022 17:16:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeremy Mikola&apos;, &apos;email&apos;: &apos;jmikola@gmail.com&apos;, &apos;username&apos;: &apos;jmikola&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-1899&quot; title=&quot;Write results should be optional to accommodate unacknowledged write concerns&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-1899&quot;&gt;&lt;del&gt;DRIVERS-1899&lt;/del&gt;&lt;/a&gt;: Permit optional results for unacknowledged write concerns (#1130)&lt;/p&gt;

&lt;p&gt;For write commands, this was previously inferable by existing documentation for the &quot;acknowledged&quot; property of Write Results. Likewise for findAndModify, comments suggested that the return value could be null. This change makes the documentation more explicit.&lt;/p&gt;

&lt;p&gt;Also adds explicit documentation that InsertOneResult and InsertManyResult are not required, which was previously inferable.&lt;/p&gt;

&lt;p&gt;Co-authored-by: Benjamin Rewis &amp;lt;32186188+benjirewis@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/specifications/commit/6ed902420587464f49fa483ff3575afb9f560f00&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/6ed902420587464f49fa483ff3575afb9f560f00&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1415036">DRIVERS-1340</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_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10940"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i00xyv:i</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>