<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:46:08 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-37484] Only alter table logging settings on startup and not collection creation</title>
                <link>https://jira.mongodb.org/browse/SERVER-37484</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;For upgrade and &lt;tt&gt;--enableMajorityReads&lt;/tt&gt; toggling, startup of a 4.1 mongod must accommodate cases where table logging settings are not in the desired state for the current process lifetime.&lt;/p&gt;

&lt;p&gt;Currently that modification is done in the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/v4.0/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp#L665-L666&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;WTRecordStore&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/v4.0/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp#L308-L311&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;WTIndex&lt;/a&gt; constructors.&lt;/p&gt;

&lt;p&gt;The constructor code path is hit in 3 cases:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Startup&lt;/li&gt;
	&lt;li&gt;Collection and index creation&lt;/li&gt;
	&lt;li&gt;Rollback via RTT&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Because the desired setting cannot change during the lifetime of a process, ideally we&apos;d only perform the operation on startup (creating new tables selects the right one). I don&apos;t believe there&apos;s a clear way to distinguish between these cases; &lt;del&gt;I believe the real work of this ticket is to find/add one.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;Going by &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alexander.gorrod&quot; class=&quot;user-hover&quot; rel=&quot;alexander.gorrod&quot;&gt;alexander.gorrod&lt;/a&gt;&apos;s last comment, we can first query the metadata and do a (fragile) string search for &lt;tt&gt;log=(enabled=&amp;lt;true|false&amp;gt;)&lt;/tt&gt; and only call &lt;tt&gt;alter&lt;/tt&gt; if the settings need to be changed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="614603">SERVER-37484</key>
            <summary>Only alter table logging settings on startup and not collection creation</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="daniel.gottlieb@mongodb.com">Daniel Gottlieb</assignee>
                                    <reporter username="daniel.gottlieb@mongodb.com">Daniel Gottlieb</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Oct 2018 13:22:36 +0000</created>
                <updated>Sun, 29 Oct 2023 22:27:37 +0000</updated>
                            <resolved>Thu, 15 Nov 2018 13:50:12 +0000</resolved>
                                                    <fixVersion>4.0.6</fixVersion>
                    <fixVersion>4.1.6</fixVersion>
                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="2115421" author="xgen-internal-githook" created="Tue, 15 Jan 2019 13:56:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;dgottlieb&apos;, &apos;email&apos;: &apos;daniel.gottlieb@mongodb.com&apos;, &apos;name&apos;: &apos;Daniel Gottlieb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37484&quot; title=&quot;Only alter table logging settings on startup and not collection creation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37484&quot;&gt;&lt;del&gt;SERVER-37484&lt;/del&gt;&lt;/a&gt;: Only change table logging settings if they are not in the expected state.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 9f2d9ce70ecf475386ead7374bf749e0f231c294)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/89afd655014137b0dbdfc78e7914a802f7924bb6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/89afd655014137b0dbdfc78e7914a802f7924bb6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2063031" author="xgen-internal-githook" created="Thu, 15 Nov 2018 13:49:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Daniel Gottlieb&apos;, &apos;email&apos;: &apos;daniel.gottlieb@mongodb.com&apos;, &apos;username&apos;: &apos;dgottlieb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37484&quot; title=&quot;Only alter table logging settings on startup and not collection creation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37484&quot;&gt;&lt;del&gt;SERVER-37484&lt;/del&gt;&lt;/a&gt;: Only change table logging settings if they are not in the expected state.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9f2d9ce70ecf475386ead7374bf749e0f231c294&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9f2d9ce70ecf475386ead7374bf749e0f231c294&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2026916" author="alexander.gorrod" created="Mon, 8 Oct 2018 18:22:03 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=daniel.gottlieb&quot; class=&quot;user-hover&quot; rel=&quot;daniel.gottlieb&quot;&gt;daniel.gottlieb&lt;/a&gt; it is actually different for WiredTiger. Retrieving metadata is a query via a cursor, so doesn&apos;t acquire any strong locks. The &lt;tt&gt;WT_SESSION::alter&lt;/tt&gt; method changes the state of a handle - WiredTiger requires exclusive access to make such changes.&lt;/p&gt;

&lt;p&gt;We don&apos;t have an optimization in place to avoid taking the lock if there is no change, partly because parsing configuration options is moderately expensive/complex in WiredTiger. If MongoDB can do that comparison simply it would likely be a simpler change.&lt;/p&gt;</comment>
                            <comment id="2024924" author="daniel.gottlieb@10gen.com" created="Fri, 5 Oct 2018 13:31:35 +0000"  >&lt;p&gt;A quick clarification &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alexander.gorrod&quot; class=&quot;user-hover&quot; rel=&quot;alexander.gorrod&quot;&gt;alexander.gorrod&lt;/a&gt;. I made an assumption resulting in how I described this ticket. Specifically, I assumed that having MongoDB query and parse the table logging settings from a &lt;tt&gt;metadata:create&lt;/tt&gt; cursor would still acquire the locks that result in the behavior we&apos;re trying to correct. If that&apos;s not true, would it be a reasonable alternative for adjusting the table logging settings to simply do a &quot;check and set&quot;?&lt;/p&gt;</comment>
                            <comment id="2024914" author="daniel.gottlieb@10gen.com" created="Fri, 5 Oct 2018 13:25:52 +0000"  >&lt;p&gt;Regarding the dependency on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37843&quot; title=&quot;Create an index reaper for two-phase index drop&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37843&quot;&gt;&lt;del&gt;SERVER-37843&lt;/del&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Re-introducing the ability to disable majority reads in 4.1 as part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37227&quot; title=&quot;Reintroduce enableMajorityReadConcern:false server parameter&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37227&quot;&gt;&lt;del&gt;SERVER-37227&lt;/del&gt;&lt;/a&gt; did not reintroduce the live changes to table settings (thus the code links in the description explicitly point at 4.0). The dependency is to correct that bug and then this ticket can address optimizing the no-op cases.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="614599">SERVER-37483</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="646517">SERVER-38447</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="614435">WT-4354</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>5.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15640"><![CDATA[v4.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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000Zstt1IAB]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 8 Oct 2018 18:22:03 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 4 weeks, 1 day 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-37483'>SERVER-37483</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_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, 4 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alexander.gorrod@mongodb.com</customfieldvalue>
            <customfieldvalue>daniel.gottlieb@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|hu9m2v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hu16r3:</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="2596">Storage NYC 2018-11-19</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|hu98c7:</customfieldvalue>

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