<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:37:19 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-34628] Remove appendCommandStatus() in favor of throwing exceptions</title>
                <link>https://jira.mongodb.org/browse/SERVER-34628</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Now we have two ways to return an error to clients: appendCommandStatus() and throwing exceptions, e.g. uassertStatusOK(). It&apos;ll be great if throwing exceptions is the only way to do so. &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34256&quot; title=&quot;On error within a transaction, expose in response whether transaction can be safely retried from the beginning&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34256&quot;&gt;&lt;del&gt;SERVER-34256&lt;/del&gt;&lt;/a&gt; appends error labels for certain error codes only in transaction. The information whether the user indicates running in a transaction is currently only available in &lt;tt&gt;service_entry_point_common.cpp&lt;/tt&gt;, so appendCommandStatus() doesn&apos;t have enough information to append the label. We have to do that afterwards by inspecting the response.&lt;/p&gt;</description>
                <environment></environment>
        <key id="532846">SERVER-34628</key>
            <summary>Remove appendCommandStatus() in favor of throwing exceptions</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="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="siyuan.zhou@mongodb.com">Siyuan Zhou</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Apr 2018 23:32:12 +0000</created>
                <updated>Sun, 29 Oct 2023 22:32:28 +0000</updated>
                            <resolved>Wed, 9 May 2018 20:23:56 +0000</resolved>
                                                    <fixVersion>4.0.0-rc0</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="1887514" author="redbeard0531" created="Wed, 9 May 2018 20:23:56 +0000"  >&lt;p&gt;While our tests showed that there was no change in the error replies we look at, it is possible that that this change causes some commands that accidentally left information in the result builder to no longer leak that (presumably incorrect) information any more.&lt;/p&gt;</comment>
                            <comment id="1886205" author="xgen-internal-githook" created="Tue, 8 May 2018 19:03:16 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;mathias@10gen.com&apos;, &apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;username&apos;: &apos;RedBeard0531&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34628&quot; title=&quot;Remove appendCommandStatus() in favor of throwing exceptions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34628&quot;&gt;&lt;del&gt;SERVER-34628&lt;/del&gt;&lt;/a&gt; Really remove appendCommandStatus&lt;/p&gt;

&lt;p&gt;All remaining callers are transitioned to some form of usassert. This was done&lt;br/&gt;
with an elaborate set of vim macros to make this tractable. Therefore it&lt;br/&gt;
should not be considered an example of the best way to write new code, just as&lt;br/&gt;
an improvement on what was there before. In particular, I couldn&apos;t easily&lt;br/&gt;
remove Status&apos;s that are named then only used once in uassertStatusOK, nor&lt;br/&gt;
could I convert the pattern of checking a StatusWith&amp;lt;T&amp;gt;&apos;s getStatus() then&lt;br/&gt;
calling getValue() to just call uassertStatusOK(returnsStatusWith()).&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/db41862c5380ab33cf28db99726cdac252df0872&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/db41862c5380ab33cf28db99726cdac252df0872&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1886204" author="xgen-internal-githook" created="Tue, 8 May 2018 19:03:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;mathias@10gen.com&apos;, &apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;username&apos;: &apos;RedBeard0531&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34628&quot; title=&quot;Remove appendCommandStatus() in favor of throwing exceptions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34628&quot;&gt;&lt;del&gt;SERVER-34628&lt;/del&gt;&lt;/a&gt; Remove support for Status/StatusWith returns in TypedCommand&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2d35461cb54e35afea223714fab1a184a9b381e2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2d35461cb54e35afea223714fab1a184a9b381e2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1886203" author="xgen-internal-githook" created="Tue, 8 May 2018 19:03:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;mathias@10gen.com&apos;, &apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;username&apos;: &apos;RedBeard0531&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34628&quot; title=&quot;Remove appendCommandStatus() in favor of throwing exceptions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34628&quot;&gt;&lt;del&gt;SERVER-34628&lt;/del&gt;&lt;/a&gt; Prep for removing appendCommandStatus&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Added appendCommandStatusNoThrow matching the current aCS behavior&lt;/li&gt;
	&lt;li&gt;Make appendCommandStatus call uassertStatusOK then aCS on success&lt;/li&gt;
	&lt;li&gt;Make the few places that need to not throw call aCSNT&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;A following commit will completely remove appendCommandStatus. It is split out&lt;br/&gt;
because that commit is fairly huge.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/589af3820b00ed0b7ac26a84cfeed6554ab191f3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/589af3820b00ed0b7ac26a84cfeed6554ab191f3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1873301" author="spencer" created="Tue, 24 Apr 2018 21:48:54 +0000"  >&lt;p&gt;The key thing here is to have a single error-handling path where code that needs to run when the command failed can run, without having to remember to duplicate that code in two places - once in the exception handling block and once by manually inspecting the responseBuilder.&lt;/p&gt;</comment>
                            <comment id="1873093" author="kaloian.manassiev" created="Tue, 24 Apr 2018 19:17:13 +0000"  >&lt;p&gt;From what I understand, appendCommandStatus just appends the error to an already populated response buffer, whereas uassert will reset it and only populate it with the assertion error. Thus removing appendCommandStatus removes the ability to do the former, but perhaps with the new means to specify serialization format for an exception&apos;s data, if there is a need to attach side information to an exception we can use that mechanism.&lt;/p&gt;

&lt;p&gt;CC &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;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="534182">SERVER-34679</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.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_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 24 Apr 2018 19:17:13 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 40 weeks 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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 40 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htw807:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hto4av:</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="2268">Platforms 2018-05-07</customfieldvalue>
    <customfieldvalue id="2269">Platforms 2018-05-21</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

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

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