<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:29:16 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-52877] Use WUOW in write ops under global write lock</title>
                <link>https://jira.mongodb.org/browse/SERVER-52877</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;While not necessary for correctness as there can&apos;t be any concurrency going on it would be a nice cleanup to not have multiple modes that we need to support throughout the code base.&lt;/p&gt;

&lt;p&gt;For example, the collection catalog exposes a way to bypass the copy-on-write system to do collection modifications directly on the instances installed in the catalog (the inplace mode). Having modes like this is prone to error and misuse so it would be better if there was a single way to do these kind of writes.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1543048">SERVER-52877</key>
            <summary>Use WUOW in write ops under global write lock</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="henrik.edin@mongodb.com">Henrik Edin</reporter>
                        <labels>
                            <label>techdebt</label>
                    </labels>
                <created>Mon, 16 Nov 2020 14:33:49 +0000</created>
                <updated>Sun, 29 Oct 2023 22:00:22 +0000</updated>
                            <resolved>Tue, 5 Apr 2022 14:54:45 +0000</resolved>
                                                    <fixVersion>6.0.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="4457746" author="xgen-internal-githook" created="Tue, 5 Apr 2022 14:17:17 +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-52877&quot; title=&quot;Use WUOW in write ops under global write lock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-52877&quot;&gt;&lt;del&gt;SERVER-52877&lt;/del&gt;&lt;/a&gt; Unify how writable Collections instances are handled&lt;/p&gt;

&lt;p&gt;CollectionCatalog::LifetimeMode has been removed. Catalog writes now&lt;br/&gt;
require that we are in an active WUOW.&lt;/p&gt;

&lt;p&gt;Make it allowed to use WriteUnitOfWork when the server is in readOnly&lt;br/&gt;
mode. It does not open storage sessions, just allows registration of&lt;br/&gt;
RecoveryUnit callbacks that are executed when calling commit(). This&lt;br/&gt;
allows for the unification of code where we need to initialize Collection&lt;br/&gt;
instances even in readOnly mode.&lt;/p&gt;

&lt;p&gt;Handling of enforcing readOnly has been pushed down to the RecordStore.&lt;br/&gt;
All interfaces that perform write now check if we are in readOnly mode&lt;br/&gt;
and throw if we are.&lt;/p&gt;

&lt;p&gt;Catalog updates using the BatchedCollectionCatalogWriter class bypass&lt;br/&gt;
the Collection cloning if the batched CollectionCatalog instance already&lt;br/&gt;
has a uniquely owned copy (a previous write to this collection has been&lt;br/&gt;
requested). It is also not required to be in an active WUOW when the&lt;br/&gt;
BatchedCollectionCatalogWriter is used.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/fa32d665bd63de7a9d246fa99df5e30840a931de&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/fa32d665bd63de7a9d246fa99df5e30840a931de&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4246781" author="JIRAUSER1253362" created="Tue, 14 Dec 2021 14:49:05 +0000"  >&lt;p&gt;Upon adding &lt;tt&gt;WriteUnitOfWork&lt;/tt&gt; to the cases where we accessed a WritableCollection with the InPlace mode, we hit an assertion in the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/storage/write_unit_of_work.cpp#L48-L50&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;constructor&lt;/a&gt; of &lt;tt&gt;WriteUnitOfWork&lt;/tt&gt; from &lt;a href=&quot;https://github.com/10gen/mongo/blob/master/src/mongo/db/catalog/database_impl.cpp#L176-L180&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;DatabaseImpl::init()&lt;/a&gt; in cases where we run mongod with &lt;tt&gt;storageGlobalParams.readOnly&lt;/tt&gt; set to true. It turned out that the read-only mode used the code path through &lt;a href=&quot;https://github.com/10gen/mongo/blob/master/src/mongo/db/startup_recovery.cpp#L536&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;repairAndRecoverDatabases()&lt;/a&gt; and depends on the InPlace mode to not use &lt;tt&gt;WriteUnitOfWork&lt;/tt&gt;. We could create a new RAII type similar to &lt;tt&gt;WriteUnitOfWork&lt;/tt&gt; class but designed specifically for read-only cases, but it defeats the purpose of the ticket which is to reduce special handlings. Putting the ticket back to backlog since it may not simplify the code how we had liked.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1988213">SERVER-63889</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1988206">SERVER-63888</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1493597">SERVER-51199</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.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>Tue, 14 Dec 2021 14:49:05 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 44 weeks, 1 day 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2544</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, 44 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>fausto.leyva@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|hyhjlj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr229o:00903i</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="5423">Execution Team 2021-12-13</customfieldvalue>
    <customfieldvalue id="5588">Execution Team 2022-02-21</customfieldvalue>
    <customfieldvalue id="5811">Execution Team 2022-03-07</customfieldvalue>
    <customfieldvalue id="5812">Execution Team 2022-03-21</customfieldvalue>
    <customfieldvalue id="5813">Execution Team 2022-04-04</customfieldvalue>
    <customfieldvalue id="5814">Execution Team 2022-04-18</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|hyh5uv:</customfieldvalue>

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