<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:25:39 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-2468] Add a test that drivers emit a CommandSucceededEvent when ok=1 and a writeConcernError is returned</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-2468</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #fafbfc;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;The command monitoring spec defines a successful command as one with an ok:1 reply and a failed command as one with an ok:0 reply. However, it seems that at least the Node driver decides whether to emit a command succeeded or failed event based on whether or not an error is going to be thrown rather than the &quot;ok&quot; value.&lt;/p&gt;

&lt;p&gt;While this seems reasonable, that logic is problematic because server replies can have ok:1 and a writeConcernError. In these cases, based on the definition of &quot;success&quot; in the command monitoring spec, we should emit a &lt;tt&gt;CommandSucceededEvent&lt;/tt&gt; but also throw an error.&lt;/p&gt;

&lt;p&gt;This came up because &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-2327&quot; title=&quot;Propagate Original Error for Write Errors Labeled NoWritesPerformed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-2327&quot;&gt;DRIVERS-2327&lt;/a&gt; adds a prose test which sets a failpoint that results in an ok:1 response with a writeConcernError and then tells the driver to expect a command succeeded event. That prose test will implicitly cover this behavior but we should add a unified test to the command monitoring spec which explicitly covers it.&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 developers who use command monitoring events in tests; driver users who consume APM events.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Howdoesthisaffecttheenduser%3F&quot;&gt;&lt;/a&gt;How does this affect the end user?&lt;/h4&gt;

&lt;p&gt;For driver developers the bug is impactful as it leads to discrepancy in what events the driver emits based on certain errors which can lead to the driver failing spec tests.&lt;/p&gt;

&lt;p&gt;Arguably this bug is less of a problem for driver users as they might expect that the buggy behavior is the right behavior (error = failed event). &lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Howlikelyisitthatthisproblemorusecasewilloccur%3F&quot;&gt;&lt;/a&gt;How likely is it that this problem or use case will occur?&lt;/h4&gt;

&lt;p&gt;Any case where there is a writeConcernError and ok=1 (most write concern errors)&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Iftheproblemdoesoccur%2Cwhataretheconsequencesandhowseverearethey%3F&quot;&gt;&lt;/a&gt;If the problem does occur, what are the consequences and how severe are they?&lt;/h4&gt;

&lt;p&gt;The wrong event type is emitted which could make e.g. logs generated from APM events confusing. &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;From a user facing perspective probably not, because we haven&apos;t heard about it yet from any users. That said, drivers will need to fix this bug to correctly implement &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-2327&quot; title=&quot;Propagate Original Error for Write Errors Labeled NoWritesPerformed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-2327&quot;&gt;DRIVERS-2327&lt;/a&gt;.&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, but the Node driver having this bug would mean it also affects users of our dev tools like mongosh.&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;The only work here is to add a test, but this test would uncover a bug in drivers that do not pass it.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="2155742">DRIVERS-2468</key>
            <summary>Add a test that drivers emit a CommandSucceededEvent when ok=1 and a writeConcernError is returned</summary>
                <type id="14901" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14700&amp;avatarType=issuetype">Spec Change</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="13453" iconUrl="https://jira.mongodb.org/images/icons/status_generic.gif" description="">Implementing</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="durran.jordan@mongodb.com">Durran Jordan</assignee>
                                    <reporter username="kaitlin.mahar@mongodb.com">Kaitlin Mahar</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Oct 2022 18:03:00 +0000</created>
                <updated>Mon, 21 Aug 2023 20:11:42 +0000</updated>
                                                                <component>Command Logging and Monitoring</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5123253" author="xgen-internal-githook" created="Thu, 19 Jan 2023 10:37:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Durran Jordan&apos;, &apos;email&apos;: &apos;durran@gmail.com&apos;, &apos;username&apos;: &apos;durran&apos;}
&lt;p&gt;Message: test(&lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-2468&quot; title=&quot;Add a test that drivers emit a CommandSucceededEvent when ok=1 and a writeConcernError is returned&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-2468&quot;&gt;DRIVERS-2468&lt;/a&gt;): add unified test for ok 1 (#1367)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/specifications/commit/18932c00f9e2f8be66b48c930cbbc428499db668&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/18932c00f9e2f8be66b48c930cbbc428499db668&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10620">
                    <name>Issue split</name>
                                            <outwardlinks description="split to">
                                        <issuelink>
            <issuekey id="2234693">PHPLIB-1063</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234685">CDRIVER-4554</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234686">CXX-2633</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234688">GODRIVER-2733</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234687">CSHARP-4480</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234689">JAVA-4842</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234691">MOTOR-1081</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234690">NODE-4958</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234692">PYTHON-3566</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234695">RUST-1567</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2234694">RUBY-3203</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2045420">DRIVERS-2327</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_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Sync the command monitoring and logging spec tests to &lt;a href=&quot;https://github.com/mongodb/specifications/commit/18932c00f9e2f8be66b48c930cbbc428499db668&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/18932c00f9e2f8be66b48c930cbbc428499db668&lt;/a&gt; and ensure that write concern errors with ok: 1 in the result publish a command succeeded event and retry the operation.&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10748"><![CDATA[Needed]]></customfieldvalue>

                        </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/CDRIVER-4554'>CDRIVER-4554</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CXX-2633'>CXX-2633</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CSHARP-4480'>CSHARP-4480</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.20.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/GODRIVER-2733'>GODRIVER-2733</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/JAVA-4842'>JAVA-4842</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>4.9.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/NODE-4958'>NODE-4958</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>5.0.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/MOTOR-1081'>MOTOR-1081</a>
    </td>
    <td>Duplicate</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PYTHON-3566'>PYTHON-3566</a>
    </td>
    <td>Won't Do</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PHPLIB-1063'>PHPLIB-1063</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>1.16.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUBY-3203'>RUBY-3203</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.19.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUST-1567'>RUST-1567</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.5.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/SWIFT-1688'>SWIFT-1688</a>
    </td>
    <td>Won't Do</td>
    <td class=''></td>
  </tr>
</table>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0w600:</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_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 19 Jan 2023 00:00:00 +0000</customfieldvalue>

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