<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:29:20 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-52904] Improve implementation of mongo::Status</title>
                <link>https://jira.mongodb.org/browse/SERVER-52904</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Status has a lot of old code that needs a facelift.&lt;/p&gt;

&lt;p&gt;(started as follow-on work from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-52741&quot; title=&quot;Avoid invariant when trying to get optional ErrorExtraInfo&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-52741&quot;&gt;&lt;del&gt;SERVER-52741&lt;/del&gt;&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Use &lt;tt&gt;boost::intrusive_ptr&lt;/tt&gt; instead of handrolled refcounting for &lt;tt&gt;_error&lt;/tt&gt; member.&lt;br/&gt;
This eliminates the need for copy and move ctors, assigns, and the destructor.&lt;/p&gt;

&lt;p&gt;Don&apos;t declare operator&amp;lt;&amp;lt; for StringBuilderImpl that we don&apos;t define.&lt;/p&gt;

&lt;p&gt;Inline the ubiquitous Status::OK() function.&lt;br/&gt;
Inline most constructors. Usually they forward to another constructor.&lt;/p&gt;

&lt;p&gt;Define inlines inside the class consistently. This was previously mixed and inconsistent. It eliminates a lot of the boilerplate from out-of-class definitions.&lt;/p&gt;

&lt;p&gt;Pass &lt;tt&gt;reason&lt;/tt&gt; by &lt;tt&gt;std::string&lt;/tt&gt; value when possible to save string copies!&lt;/p&gt;

&lt;p&gt;Accept anything as a &lt;tt&gt;reason&lt;/tt&gt; parameter if it can direct-initialize a &lt;tt&gt;std::string&lt;/tt&gt;. This eliminates fwd decl of &lt;tt&gt;std::stream&lt;/tt&gt;, and eliminates the combinatoric redundancy of providing overloads for &lt;tt&gt;const char*&lt;/tt&gt;, &lt;tt&gt;StringData&lt;/tt&gt;, &lt;tt&gt;std::string&lt;/tt&gt;, and &lt;tt&gt;std::stream&lt;/tt&gt;, which also leaves a lot of viable argument types missing anyway.&lt;/p&gt;

&lt;p&gt;Remove useless &lt;tt&gt;const&lt;/tt&gt; from return types and from parameters.&lt;/p&gt;

&lt;p&gt;Use &lt;tt&gt;std::is_..._v&lt;/tt&gt; traits bools.&lt;/p&gt;

&lt;p&gt;Define inline-friend-defs for all &lt;tt&gt;==&lt;/tt&gt; and &lt;tt&gt;!=&lt;/tt&gt; operators so they are applied symmetrically, and are only visible to ADL search.&lt;/p&gt;

&lt;p&gt;Allocate the empty &lt;tt&gt;reason()&lt;/tt&gt; static local string so it is valid at shutdown.&lt;/p&gt;

&lt;p&gt;Remove the &lt;tt&gt;refCount()&lt;/tt&gt; member, replace with a &lt;tt&gt;testOnlyAccess()&lt;/tt&gt; proxy object that can retrieve the same data, but more obviously and strictly test only.&lt;/p&gt;

&lt;p&gt;Simplify ErrorInfo to a simple struct, inherit from &lt;tt&gt;boost::intrusive_ref_counter&lt;/tt&gt;. No explicit atomics for refcounting, no const members, no member functions. Let Status enforce the constness and creation invariants. &lt;tt&gt;Status::ErrorInfo&lt;/tt&gt; becomes just plain info.&lt;/p&gt;

&lt;p&gt;Add static &lt;tt&gt;Status::_createErrorInfo&lt;/tt&gt; and &lt;tt&gt;Status::_parseErrorInfo&lt;/tt&gt; functions to produce intrusive_ptr to initialize the _error member from constructors. Get rid of the risky &lt;tt&gt;*this = someStatus...&lt;/tt&gt; error handling in favor of these functions.&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;https://mongodbcr.appspot.com/709190050/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/709190050/&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1543736">SERVER-52904</key>
            <summary>Improve implementation of mongo::Status</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="billy.donahue@mongodb.com">Billy Donahue</assignee>
                                    <reporter username="billy.donahue@mongodb.com">Billy Donahue</reporter>
                        <labels>
                            <label>carry-over</label>
                    </labels>
                <created>Tue, 17 Nov 2020 04:35:09 +0000</created>
                <updated>Sun, 29 Oct 2023 22:00:20 +0000</updated>
                            <resolved>Mon, 23 Aug 2021 17:57:20 +0000</resolved>
                                                    <fixVersion>5.1.0-rc0</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4108178" author="JIRAUSER1259052" created="Wed, 6 Oct 2021 18:59:15 +0000"  >&lt;p&gt;Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it&#8217;s been triggered. For more active release information, please keep an eye on #server-release. Thank you!&lt;/p&gt;</comment>
                            <comment id="4017631" author="billy.donahue" created="Mon, 23 Aug 2021 17:56:39 +0000"  >&lt;p&gt;This change succeeded as long as I didn&apos;t try to refactor the RefCountable class.&lt;br/&gt;
Not sure what the problem was but changing the structure of RefCountable in what should have been a compatible way caused a null pointer dereference somewhere in &lt;tt&gt;mongo::ExpressionNary::_doAddDependencies(mongo::DepsTracker*) const&lt;/tt&gt; during the `test_api_version_compatibility` task on RHEL80.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://evergreen.mongodb.com/lobster/evergreen/task/mongodb_mongo_master_enterprise_rhel_80_64_bit_dynamic_required_test_api_version_compatibility_patch_05a7e410d067261ed8e940b7aa086a47502f45d1_611596113627e074e773072e_21_08_13_19_30_09/0/task#bookmarks=0%2C1984&amp;amp;l=1&amp;amp;shareLine=1536&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://evergreen.mongodb.com/lobster/evergreen/task/mongodb_mongo_master_enterprise_rhel_80_64_bit_dynamic_required_test_api_version_compatibility_patch_05a7e410d067261ed8e940b7aa086a47502f45d1_611596113627e074e773072e_21_08_13_19_30_09/0/task#bookmarks=0%2C1984&amp;amp;l=1&amp;amp;shareLine=1536&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This may be worth looking into separately!&lt;/p&gt;</comment>
                            <comment id="4017617" author="xgen-internal-githook" created="Mon, 23 Aug 2021 17:49:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-52904&quot; title=&quot;Improve implementation of mongo::Status&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-52904&quot;&gt;&lt;del&gt;SERVER-52904&lt;/del&gt;&lt;/a&gt; Status facelift&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c0a7fd4ea328cea80eb81444f4cc480b508d949c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c0a7fd4ea328cea80eb81444f4cc480b508d949c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3876833" author="billy.donahue" created="Mon, 14 Jun 2021 19:14:15 +0000"  >&lt;p&gt;Code review &lt;a href=&quot;https://mongodbcr.appspot.com/762610002&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/762610002&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3497150" author="billy.donahue" created="Thu, 19 Nov 2020 05:20:13 +0000"  >&lt;p&gt;Marking this as depending on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-52941&quot; title=&quot;Break checked_cast.h assert_util.h cycles, optimize its implementation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-52941&quot;&gt;&lt;del&gt;SERVER-52941&lt;/del&gt;&lt;/a&gt; so we can use checked_pointer_cast in status.h while we&apos;re at it.&lt;/p&gt;</comment>
                            <comment id="3494493" author="billy.donahue" created="Tue, 17 Nov 2020 20:31:54 +0000"  >&lt;p&gt;code review - &lt;tt&gt;&lt;a href=&quot;https://mongodbcr.appspot.com/709190050/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/709190050/&lt;/a&gt;&lt;/tt&gt; - (obsolete)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="1644220">SERVER-55056</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1545842">SERVER-52941</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1538382">SERVER-52741</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>13.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 23 Aug 2021 17:49:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 18 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-52941'>SERVER-52941</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-55056'>SERVER-55056</a></s>]]></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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</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>
                            2 years, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>vivian.ge@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hyhno7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzc5w7:</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="4274">Service arch 2020-12-28</customfieldvalue>
    <customfieldvalue id="4502">Service Arch 2021-03-08</customfieldvalue>
    <customfieldvalue id="4503">Service Arch 2021-03-22</customfieldvalue>
    <customfieldvalue id="4504">Service Arch 2021-04-05</customfieldvalue>
    <customfieldvalue id="4685">Service Arch 2021-04-19</customfieldvalue>
    <customfieldvalue id="4687">Service Arch 2021-05-17</customfieldvalue>
    <customfieldvalue id="5031">Service Arch 2021-05-31</customfieldvalue>
    <customfieldvalue id="5076">Service Arch 2021-06-14</customfieldvalue>
    <customfieldvalue id="5127">Service Arch 2021-06-28</customfieldvalue>
    <customfieldvalue id="5184">Service Arch 2021-07-12</customfieldvalue>
    <customfieldvalue id="5291">Service Arch 2021-08-09</customfieldvalue>
    <customfieldvalue id="5292">Service Arch 2021-08-23</customfieldvalue>
    <customfieldvalue id="5294">Service Arch 2021-09-20</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</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|hyh9xj:</customfieldvalue>

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