<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:29:28 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-52948] Investigate removing MONGO_COMPILER_COLD_FUNCTION from appropriate StatusWith constructors</title>
                <link>https://jira.mongodb.org/browse/SERVER-52948</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I&apos;m skeptical about whether these add any perf benefit, and am suspicious that they might actually incur a loss. We should perf test removing these in turn and seeing how that affects performance.&lt;/p&gt;

&lt;p&gt;In particular the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/85bcda3cf2e0fe996f022fb065326aca524cb07a/src/mongo/base/status_with.h#L119&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;implicit conversion constructor from Status -&amp;gt; StatusWith&lt;/a&gt; could be called on accident by passing Status to a function that takes StatusWith as a parameter and user would not know they were doing something &quot;cold&quot;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1546238">SERVER-52948</key>
            <summary>Investigate removing MONGO_COMPILER_COLD_FUNCTION from appropriate StatusWith constructors</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-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="matthew.saltz@mongodb.com">Matthew Saltz</reporter>
                        <labels>
                            <label>servicearch-wfbf-day</label>
                    </labels>
                <created>Thu, 19 Nov 2020 18:20:04 +0000</created>
                <updated>Thu, 2 Feb 2023 18:27:09 +0000</updated>
                                                                            <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4421572" author="JIRAUSER1262719" created="Fri, 18 Mar 2022 19:25:56 +0000"  >&lt;p&gt;We haven&#8217;t heard back from you for some time, so we&apos;re going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;</comment>
                            <comment id="3498261" author="billy.donahue" created="Thu, 19 Nov 2020 19:10:30 +0000"  >&lt;p&gt;I&apos;ll just paste in my thoughts on the nonexplicit StatusWith(Status) ctor from the #server-servicearch thread.&lt;/p&gt;

&lt;p&gt;There&apos;s a dassert in there that the status is !isOK().&lt;/p&gt;

&lt;p&gt;A few things:&lt;/p&gt;

&lt;p&gt;That&apos;s an inappropriate dassert and should be upgraded to invariant immediately. The check is crucial to StatusWith&apos;s internal consistency, and extremely cheap to compute (amounts to checking pointer nullity). As an error handler, it&apos;s likely that a significant portion of the callgraph edges leading to it are untested, so debug builds are insufficient enforcement.&lt;br/&gt;
We have to have more docs on that invariant than &quot;for the error case&quot;. A server will crash if that function is given an OK status. I think that risk needs a signal boost.&lt;/p&gt;

&lt;p&gt;Should a conversion that&apos;s potentially so catastrophic really be non explicit? It&apos;s supremely useful for a function with a StatusWith&amp;lt;LongBoringName&amp;gt; return type to be able to return status; instead of return StatusWith&amp;lt;LongBoringName&amp;gt;(status); But a helper function like makeStatusWith(status) can take care of that pain. All told I think implicit conversion is probably going to end up being too convenient to axe.&lt;/p&gt;

&lt;p&gt;We treat ALL non-OK Status handling as exceptional and therefore cold. This is a case where we KNOW the Status is exceptional or we&apos;re breaking an invariant. So it&apos;s as justified a MONGO_COMPILER_COLD_FUNCTION as any other function or Status/StatusWith ctor designed for exceptional Status.  If the compiler back-propagates that coldness back up to a conditional, that&apos;s appropriate and we should thank it for being so smart.&lt;/p&gt;

&lt;p&gt;I guess I&apos;m unclear what problem you&apos;re anticipating. With a f(StatusWith&amp;lt;int&amp;gt;), a caller calls it with f(status) . That status must be nonOK or this is a serious logic error. Relative performance of cold/noncold paths is the least of our worries. That&apos;s an exceptional path and should be as cold as any identified exceptional Status path.&lt;/p&gt;

&lt;p&gt;If the question is about whether we should have COLD paths for exceptional Status in general, that&apos;s possibly a discussion to open up. But this particular annotation on this particular function isn&apos;t special. It&apos;s like all the others.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</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="25132"><![CDATA[Service Arch]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 19 Nov 2020 19:10:30 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 46 weeks, 5 days 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>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>elizabeth.roytburd@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 46 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-servicearch</customfieldvalue>
            <customfieldvalue>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>lauren.lewis@mongodb.com</customfieldvalue>
            <customfieldvalue>matthew.saltz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hyi2qn:</customfieldvalue>

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

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