<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:52:53 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>[SERVER-39706] Include codeName field in writeErrors array</title>
                <link>https://jira.mongodb.org/browse/SERVER-39706</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Somewhere between v4.1.7-51-gb4f82034e6 and v4.1.8-73-ge2251dbc97, tests for the convenient transactions API started failing because the server ceased to return  a code and code name for DuplicateKey errors.&lt;/p&gt;

&lt;p&gt;The test: &lt;a href=&quot;https://github.com/mongodb/mongo-ruby-driver/blob/master/spec/spec_tests/data/transactions_api/callback-retry.yml#L129&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-ruby-driver/blob/master/spec/spec_tests/data/transactions_api/callback-retry.yml#L129&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The response we are currently getting with 4.1.8:&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;   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;{&quot;n&quot;=&amp;gt;0, &quot;writeErrors&quot;=&amp;gt;[{&quot;index&quot;=&amp;gt;0, &quot;code&quot;=&amp;gt;11000, &quot;keyPattern&quot;=&amp;gt;{&quot;_id&quot;=&amp;gt;1}, &quot;keyValue&quot;=&amp;gt;{&quot;&quot;=&amp;gt;1}, &quot;errmsg&quot;=&amp;gt;&quot;E11000 duplicate key error collection: ruby-driver.test index: _id_ dup key: { _id: 1 }&quot;}], &quot;opTime&quot;=&amp;gt;{&quot;ts&quot;=&amp;gt;#&amp;lt;BSON::Timestamp:0x000055dd583c1488 @seconds=1550719073, @increment=3&amp;gt;, &quot;t&quot;=&amp;gt;2}, &quot;electionId&quot;=&amp;gt;BSON::ObjectId(&apos;7fffffff0000000000000002&apos;), &quot;ok&quot;=&amp;gt;1.0, &quot;$clusterTime&quot;=&amp;gt;{&quot;clusterTime&quot;=&amp;gt;#&amp;lt;BSON::Timestamp:0x000055dd583c0e70 @seconds=1550719073, @increment=3&amp;gt;, &quot;signature&quot;=&amp;gt;{&quot;hash&quot;=&amp;gt;&amp;lt;BSON::Binary:0x47204578231900 type=generic data=0x0000000000000000...&amp;gt;, &quot;keyId&quot;=&amp;gt;0}}, &quot;operationTime&quot;=&amp;gt;#&amp;lt;BSON::Timestamp:0x000055dd583c0bc8 @seconds=1550719073, @increment=3&amp;gt;}&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;It includes errmsg but no code or code name.&lt;/p&gt;

&lt;p&gt;4.0 response for comparison:&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;   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;{&quot;operationTime&quot;=&amp;gt;#&amp;lt;BSON::Timestamp:0x00005620520854f8 @seconds=1550719590, @increment=3&amp;gt;, &quot;ok&quot;=&amp;gt;0.0, &quot;errmsg&quot;=&amp;gt;&quot;E11000 duplicate key error collection: ruby-driver.test index: _id_ dup key: { : 1 }&quot;, &quot;code&quot;=&amp;gt;11000, &quot;codeName&quot;=&amp;gt;&quot;DuplicateKey&quot;, &quot;$clusterTime&quot;=&amp;gt;{&quot;clusterTime&quot;=&amp;gt;#&amp;lt;BSON::Timestamp:0x000056205209c680 @seconds=1550719590, @increment=3&amp;gt;, &quot;signature&quot;=&amp;gt;{&quot;hash&quot;=&amp;gt;&amp;lt;BSON::Binary:0x47348407684780 type=generic data=0x0000000000000000...&amp;gt;, &quot;keyId&quot;=&amp;gt;0}}}&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;It looks like previously DuplicateKey was returned as a top level error, and then it had code name and code, and now DuplicateKey is a write error and it does not have code name and code anymore.&lt;/p&gt;</description>
                <environment></environment>
        <key id="701763">SERVER-39706</key>
            <summary>Include codeName field in writeErrors array</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-optimization">Backlog - Query Optimization</assignee>
                                    <reporter username="oleg.pudeyev@mongodb.com">Oleg Pudeyev</reporter>
                        <labels>
                            <label>query-44-grooming</label>
                    </labels>
                <created>Thu, 21 Feb 2019 03:28:29 +0000</created>
                <updated>Tue, 6 Dec 2022 03:05:22 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="2309569" author="oleg.pudeyev" created="Tue, 2 Jul 2019 14:53:19 +0000"  >&lt;p&gt;Per the discussion in slack, I think it is OK to not make any server changes and instead make this change to the spec test:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/specifications/pull/586&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/pull/586&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2294639" author="james.wahlin@10gen.com" created="Mon, 24 Jun 2019 14:00:49 +0000"  >&lt;p&gt;Our proposal for addressing this ticket is to add &apos;codeName&apos; as a field in the to the writeErrors array object, along side &apos;code&apos;. We are waiting for clarification from the drivers team as to whether this would be an acceptable solution.&lt;/p&gt;</comment>
                            <comment id="2235405" author="craig.homa" created="Mon, 6 May 2019 15:38:58 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=james.wahlin&quot; class=&quot;user-hover&quot; rel=&quot;james.wahlin&quot;&gt;james.wahlin&lt;/a&gt; will huddle up with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=redbeard0531&quot; class=&quot;user-hover&quot; rel=&quot;redbeard0531&quot;&gt;redbeard0531&lt;/a&gt; and drivers to see what the best next step for this is.&#160;&lt;/p&gt;</comment>
                            <comment id="2218224" author="redbeard0531" created="Thu, 18 Apr 2019 18:29:01 +0000"  >&lt;p&gt;I don&apos;t think we have ever included the &lt;tt&gt;codeName&lt;/tt&gt; field in the &lt;tt&gt;writeErrors&lt;/tt&gt; style reply used by write commands. For better or worse, that format has historically only had &lt;tt&gt;index&lt;/tt&gt;, &lt;tt&gt;code&lt;/tt&gt;, and &lt;tt&gt;errmsg&lt;/tt&gt; fields. In the 4.0 output the error is reported as an {&lt;tt&gt;ok:0&lt;/tt&gt;} style top-level command failure. The 4.1 reply is using the nested &lt;tt&gt;writeErrors&lt;/tt&gt; form with {&lt;tt&gt;ok:1&lt;/tt&gt;}. So &lt;tt&gt;code&lt;/tt&gt; &lt;b&gt;is&lt;/b&gt; being reported, just in a different format.&lt;/p&gt;

&lt;p&gt;Sending to Query to decide if the change in error reporting style is desirable, and if we want to start include &lt;tt&gt;codeName&lt;/tt&gt; in &lt;tt&gt;writeErrors&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="2158285" author="james.wahlin@10gen.com" created="Thu, 21 Feb 2019 13:47:47 +0000"  >&lt;p&gt;CCing &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=redbeard0531&quot; class=&quot;user-hover&quot; rel=&quot;redbeard0531&quot;&gt;redbeard0531&lt;/a&gt; who have been involved in discussion around error responses.&lt;/p&gt;</comment>
                            <comment id="2158027" author="oleg.pudeyev" created="Thu, 21 Feb 2019 04:46:41 +0000"  >&lt;p&gt;The driver currently does not return error code name for errors affected by this ticket. In Ruby we parse the error code out of the message but do not do so for error code name (because the code name is not part of the message, and we don&apos;t have a map of all codes to code names in the driver). Therefore when these errors happen, the driver will not expose code name to users. This can be considered a regression from 4.0 and earlier 4.1 behavior.&lt;/p&gt;

&lt;p&gt;I am not clear on severity of not asserting the DuplicateKey error code name in the test suite, it is probably minor.&lt;/p&gt;

&lt;p&gt;For completeness, the workaround I am proposing for Ruby is to map 11000 to DuplicateKey and retain the assertion (&lt;a href=&quot;https://github.com/mongodb/mongo-ruby-driver/pull/1267&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-ruby-driver/pull/1267&lt;/a&gt;), though I made that PR prior to locating the spec PR mentioned above.&lt;/p&gt;</comment>
                            <comment id="2158013" author="thomas.schubert" created="Thu, 21 Feb 2019 04:28:47 +0000"  >&lt;p&gt;I believe the write error change was &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38583&quot; title=&quot;Transactional bulkWrite error missing writeErrors (mongod)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38583&quot;&gt;&lt;del&gt;SERVER-38583&lt;/del&gt;&lt;/a&gt; and the error code change was &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37124&quot; title=&quot;Retry full upsert path when duplicate key exception matches exact query predicate&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37124&quot;&gt;&lt;del&gt;SERVER-37124&lt;/del&gt;&lt;/a&gt; (a bit earlier).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=oleg.pudeyev&quot; class=&quot;user-hover&quot; rel=&quot;oleg.pudeyev&quot;&gt;oleg.pudeyev&lt;/a&gt;, could you clarify whether this change in behavior is still a concern for you after applying the workaround?&lt;/p&gt;

&lt;p&gt;cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=james.wahlin&quot; class=&quot;user-hover&quot; rel=&quot;james.wahlin&quot;&gt;james.wahlin&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2157998" author="oleg.pudeyev" created="Thu, 21 Feb 2019 03:38:30 +0000"  >&lt;p&gt;This was worked around in &lt;a href=&quot;https://github.com/mongodb/specifications/pull/482&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/pull/482&lt;/a&gt; by removing the assertion that the code is a DuplicateKey.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2129028">RUBY-3107</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25126"><![CDATA[Query Optimization]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 21 Feb 2019 04:28:47 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 32 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 32 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-optimization</customfieldvalue>
            <customfieldvalue>craig.homa@mongodb.com</customfieldvalue>
            <customfieldvalue>james.wahlin@mongodb.com</customfieldvalue>
            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>oleg.pudeyev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huo8nr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2gw7:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="2844">Query 2019-06-17</customfieldvalue>
    <customfieldvalue id="2845">Query 2019-07-01</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                    <customfieldvalue><![CDATA[kelsey.schubert@mongodb.com]]></customfieldvalue>
    

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hunux3:</customfieldvalue>

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