<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:05:17 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-66385] Remove ThreadName&apos;s dependence on ThreadContext (&amp; vice versa apparently)</title>
                <link>https://jira.mongodb.org/browse/SERVER-66385</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;ThreadName is a low-level diagnostic, not a db business object.&lt;br/&gt;
For maximum generality, it should not have any idea what mongodb is.&lt;br/&gt;
The idea that there&apos;s a &quot;pre-init&quot; for ThreadName, or that it depends on a MONGO_INITIALIZER for ThreadContext to get started is a bad fit that&lt;br/&gt;
causes bugs: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58194&quot; title=&quot;Fix undefined behavior in the destructor for OpMsgFuzzerFixture&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58194&quot;&gt;&lt;del&gt;SERVER-58194&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-63852&quot; title=&quot;getThreadName() should not crash&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-63852&quot;&gt;&lt;del&gt;SERVER-63852&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After working on ThreadName&apos;s API I don&apos;t see a reason for it to be connected to ThreadContext.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2044539">SERVER-66385</key>
            <summary>Remove ThreadName&apos;s dependence on ThreadContext (&amp; vice versa apparently)</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>
                    </labels>
                <created>Wed, 11 May 2022 14:12:14 +0000</created>
                <updated>Sun, 29 Oct 2023 21:38:20 +0000</updated>
                            <resolved>Fri, 13 May 2022 19:47:22 +0000</resolved>
                                                    <fixVersion>6.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4547605" author="xgen-internal-githook" created="Fri, 13 May 2022 18:53:40 +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-66385&quot; title=&quot;Remove ThreadName&amp;#39;s dependence on ThreadContext (&amp;amp; vice versa apparently)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-66385&quot;&gt;&lt;del&gt;SERVER-66385&lt;/del&gt;&lt;/a&gt; separate ThreadName from ThreadContext&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/44629a3516e8d94f5dd5509e896e4c34801f8527&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/44629a3516e8d94f5dd5509e896e4c34801f8527&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4546848" author="billy.donahue" created="Fri, 13 May 2022 03:13:15 +0000"  >&lt;p&gt;Figured it out.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;ThreadContext&lt;/tt&gt; doesn&apos;t actually exist on a thread until code executing on that thread accesses it with &lt;tt&gt;ThreadContext::get()&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The code in &lt;tt&gt;TransportLayerASIOWithServiceContextTest&lt;/tt&gt;, and perhaps other code, was depending on the construction of decorations of &lt;tt&gt;ThreadContext&lt;/tt&gt; to detect the starting and ending of threads. This only got us as far as it did because &lt;tt&gt;LOGV2&lt;/tt&gt; statements would access &lt;tt&gt;getThreadName&lt;/tt&gt; which implies an access to &lt;tt&gt;ThreadContext::get&lt;/tt&gt;, which caused &lt;tt&gt;ThreadContext&lt;/tt&gt; to be created for new threads pretty soon after they were created, but only if they did any logging.&lt;/p&gt;

&lt;p&gt;So if &lt;tt&gt;ThreadName&lt;/tt&gt; has nothing to do with &lt;tt&gt;ThreadContext&lt;/tt&gt; anymore (as proposed in this ticket), then nothing else creates &lt;tt&gt;ThreadContext&lt;/tt&gt; for new threads. I think the intent of &lt;tt&gt;ThreadContext&lt;/tt&gt; was that it should exist for all threads for their whole lifespan, not just after they emit their first log statement, so one solution is to add a call to &lt;tt&gt;ThreadContext::get&lt;/tt&gt; at the beginning of the &lt;tt&gt;stdx::thread&lt;/tt&gt; callback wrapper. We don&apos;t need to use the returned value and can just discard it, but we need the construction side effect.&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;https://github.com/10gen/mongo/blob/master/src/mongo/util/thread_context.h#L42&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/blob/master/src/mongo/util/thread_context.h#L42&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&amp;gt; * A ThreadContext is a simple decorable that has an explicit one-to-one relationship with threads.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;No it doesn&apos;t. I&apos;ll fix the inaccurate docs too.&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="2046384">SERVER-66455</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2046389">SERVER-66456</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10620">
                    <name>Issue split</name>
                                                                <inwardlinks description="split from">
                                        <issuelink>
            <issuekey id="1986692">SERVER-63852</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2046523">SERVER-66464</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1805940">SERVER-58194</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1986692">SERVER-63852</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>2.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="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>Thu, 12 May 2022 01:10:48 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 38 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_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>
                            1 year, 38 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>135.0</customfieldvalue>

                        </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>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0uio7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0dffc:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6137">Service Arch 2022-05-16</customfieldvalue>
    <customfieldvalue id="6263">Service Arch 2022-05-30</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|i0u4tj:</customfieldvalue>

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