<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:42:33 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-36258] Perform construction of ServiceContext after execution of mongo initializers, not during</title>
                <link>https://jira.mongodb.org/browse/SERVER-36258</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The &quot;global&quot; instance of ServiceContext is currently created by mongo initializers in all processes that link service_context.cpp. However, it&apos;s illegal to create threads inside mongo initializers. Also, test cases are supposed to construct their own ServiceContext per test case using the ServiceContextTest fixture or one of its relatives, so having the global one leads to programming errors in tests.&lt;/p&gt;

&lt;p&gt;This task is to remove the MONGO_INITIALIZER(ServiceContext) and instead manually instantiate the ServiceContext in mongos, mongod, and the embedded library, and then to fix the fallout.&lt;/p&gt;</description>
                <environment></environment>
        <key id="575726">SERVER-36258</key>
            <summary>Perform construction of ServiceContext after execution of mongo initializers, not during</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="henrik.edin@mongodb.com">Henrik Edin</assignee>
                                    <reporter username="schwerin@mongodb.com">Andy Schwerin</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jul 2018 19:45:21 +0000</created>
                <updated>Sun, 29 Oct 2023 22:29:36 +0000</updated>
                            <resolved>Mon, 30 Jul 2018 13:54:37 +0000</resolved>
                                                    <fixVersion>4.0.3</fixVersion>
                    <fixVersion>4.1.2</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2001999" author="xgen-internal-githook" created="Thu, 13 Sep 2018 16:12:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Henrik Edin&apos;, &apos;email&apos;: &apos;henrik.edin@mongodb.com&apos;, &apos;username&apos;: &apos;henrikedin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34798&quot; title=&quot;Replace subclasses of ServiceContext with decorations and flexible initialization code&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34798&quot;&gt;&lt;del&gt;SERVER-34798&lt;/del&gt;&lt;/a&gt; Remove ServiceContext subclasses and use new ServiceContext in every unit test.&lt;/p&gt;

&lt;p&gt;This patch does several loosely related and surprisingly hard to separate things.&lt;/p&gt;

&lt;p&gt;1.) Make the ServiceContext class final&lt;/p&gt;

&lt;p&gt;2.) Create a mechanism, called ConstructorActions, for running methods on&lt;br/&gt;
ServiceContexts immediately after they&apos;re built and immediately before they&apos;re&lt;br/&gt;
destroyed.&lt;/p&gt;

&lt;p&gt;3.) Introduce / improve test fixture base classes for tests, giving them fresh&lt;br/&gt;
ServiceContext instances for each test case. There is one fixture for tests that&lt;br/&gt;
need a storage engine and another for those that do not.&lt;/p&gt;

&lt;p&gt;4.) Make several remaining global variables SC decorations in support of (3)&lt;/p&gt;

&lt;p&gt;5.) Replace many MONGO_INITIALIZERS that access getGlobalServiceContext with the&lt;br/&gt;
new constructor-actions system, which is needed for (3.)&lt;/p&gt;

&lt;p&gt;6.) Fix up tests to use the fixtures from (3) and fix tests that silently used&lt;br/&gt;
different service contexts in together in a technically illegal fashion that now&lt;br/&gt;
breaks.&lt;/p&gt;

&lt;p&gt;7.) Utilize (2) as necessary to simplify initialization of new ServiceContexts,&lt;br/&gt;
simplifying the fixtures in (3).&lt;/p&gt;

&lt;p&gt;(cherry picked from commit d520be0814492c262515cf0a5d62a127ace70dce)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35985&quot; title=&quot;sessions_test and sharding_catalog_manager_test don&amp;#39;t destroy all Clients before destroying the ServiceContext&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35985&quot;&gt;&lt;del&gt;SERVER-35985&lt;/del&gt;&lt;/a&gt; Destroy clients started in other threads.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 9a68eb0cc65a93233b4ff5746330f9eb77de9b90)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36258&quot; title=&quot;Perform construction of ServiceContext after execution of mongo initializers, not during&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36258&quot;&gt;&lt;del&gt;SERVER-36258&lt;/del&gt;&lt;/a&gt; Construct ServiceContext after mongo initializers complete.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bfe170e49b1dc10b2badde45bc13c057a2f8ab61)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36400&quot; title=&quot;Explicitly destroy the client on exiting the run body of each BackgroundJob&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36400&quot;&gt;&lt;del&gt;SERVER-36400&lt;/del&gt;&lt;/a&gt; Explicitly destroy the client on exiting run() of each BackgroundJob&lt;/p&gt;

&lt;p&gt;(cherry picked from commit b079e4713d897b5541c2804386025817ec720800)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36351&quot; title=&quot;ServiceContextMongoDTest doesn&amp;#39;t persist TempDir correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36351&quot;&gt;&lt;del&gt;SERVER-36351&lt;/del&gt;&lt;/a&gt; Fix so ServiceContextMongoDTest removes the temp directory in its destructor.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 4c16f0f336f4db77034e8aa594bbd4a5bac3f40c)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36347&quot; title=&quot;Make parse_zone_info.js handle new error message from ServiceContext refactor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36347&quot;&gt;&lt;del&gt;SERVER-36347&lt;/del&gt;&lt;/a&gt; Fix parse_zone_info.py after ServiceContext refactor.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit c9d4204b6243e5eee6fe0b5e2c34d02af9ac5edb)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/58feaec9c55629ba253b1ff013736eb8b8e9c79d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/58feaec9c55629ba253b1ff013736eb8b8e9c79d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2001986" author="xgen-internal-githook" created="Thu, 13 Sep 2018 16:06:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Henrik Edin&apos;, &apos;email&apos;: &apos;henrik.edin@mongodb.com&apos;, &apos;username&apos;: &apos;henrikedin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34798&quot; title=&quot;Replace subclasses of ServiceContext with decorations and flexible initialization code&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34798&quot;&gt;&lt;del&gt;SERVER-34798&lt;/del&gt;&lt;/a&gt; Remove ServiceContext subclasses and use new ServiceContext in every unit test.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 7ba144c6d0e28282e47450634ca5370b270e3207)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36258&quot; title=&quot;Perform construction of ServiceContext after execution of mongo initializers, not during&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36258&quot;&gt;&lt;del&gt;SERVER-36258&lt;/del&gt;&lt;/a&gt; Construct ServiceContext after mongo initializers complete.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit f9e131ad70d3103513e777cb2125daa1daae23ec)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/c94b377a1c608177fb394f756df94fb8720d9746&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/c94b377a1c608177fb394f756df94fb8720d9746&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1959061" author="xgen-internal-githook" created="Fri, 27 Jul 2018 20:21:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;amschwerin&apos;, &apos;name&apos;: &apos;Andy Schwerin&apos;, &apos;email&apos;: &apos;schwerin@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36258&quot; title=&quot;Perform construction of ServiceContext after execution of mongo initializers, not during&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36258&quot;&gt;&lt;del&gt;SERVER-36258&lt;/del&gt;&lt;/a&gt; Construct ServiceContext after mongo initializers complete.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bfe170e49b1dc10b2badde45bc13c057a2f8ab61&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bfe170e49b1dc10b2badde45bc13c057a2f8ab61&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1959060" author="xgen-internal-githook" created="Fri, 27 Jul 2018 20:21:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Henrik Edin&apos;, &apos;email&apos;: &apos;henrik.edin@mongodb.com&apos;, &apos;username&apos;: &apos;henrikedin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36258&quot; title=&quot;Perform construction of ServiceContext after execution of mongo initializers, not during&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36258&quot;&gt;&lt;del&gt;SERVER-36258&lt;/del&gt;&lt;/a&gt; Construct ServiceContext after mongo initializers complete.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/f9e131ad70d3103513e777cb2125daa1daae23ec&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/f9e131ad70d3103513e777cb2125daa1daae23ec&lt;/a&gt;&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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.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>Fri, 27 Jul 2018 14:51:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 21 weeks, 6 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>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, 21 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>henrik.edin@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu3cjr:</customfieldvalue>

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

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