<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:07:10 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-44854] Ensure collections with commit timestamps have appropriately set minimum visible snapshots by the time the collections are visible in the catalog</title>
                <link>https://jira.mongodb.org/browse/SERVER-44854</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43859&quot; title=&quot;Use only MODE_IX locks for creating a new collection, and new db if needed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43859&quot;&gt;&lt;del&gt;SERVER-43859&lt;/del&gt;&lt;/a&gt; exposed an issue where, for collections on standalones and non-replicated collections on replica sets, during collection creation, the object for the newly-created collection could be accessible prior to the storage transaction being committed. This was not a problem before&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43859&quot; title=&quot;Use only MODE_IX locks for creating a new collection, and new db if needed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43859&quot;&gt;&lt;del&gt;SERVER-43859&lt;/del&gt;&lt;/a&gt;, since the MODE_X collection lock was held throughout the creation, preventing access to the collection object before the command completed. As of that ticket, we no longer take the exclusive lock, so the issue needs to be otherwise addressed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1026517">SERVER-44854</key>
            <summary>Ensure collections with commit timestamps have appropriately set minimum visible snapshots by the time the collections are visible in the catalog</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="maria.vankeulen@mongodb.com">Maria van Keulen</assignee>
                                    <reporter username="maria.vankeulen@mongodb.com">Maria van Keulen</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Nov 2019 21:00:04 +0000</created>
                <updated>Sun, 29 Oct 2023 22:14:34 +0000</updated>
                            <resolved>Mon, 16 Mar 2020 22:00:14 +0000</resolved>
                                                    <fixVersion>4.4.0-rc0</fixVersion>
                    <fixVersion>4.7.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="2982956" author="xgen-internal-githook" created="Tue, 17 Mar 2020 13:13:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Maria van Keulen&apos;, &apos;email&apos;: &apos;maria@mongodb.com&apos;, &apos;username&apos;: &apos;mvankeulen94&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44854&quot; title=&quot;Ensure collections with commit timestamps have appropriately set minimum visible snapshots by the time the collections are visible in the catalog&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44854&quot;&gt;&lt;del&gt;SERVER-44854&lt;/del&gt;&lt;/a&gt; Make stronger visibility guarantees for new collections&lt;/p&gt;

&lt;p&gt;(cherry picked from commit ce57a85479032380593268db65dfc9441c65cd9a)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/107f3397f5bf3a2cb14624fadbe85c05bd5caa03&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/107f3397f5bf3a2cb14624fadbe85c05bd5caa03&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2982375" author="maria.vankeulen" created="Mon, 16 Mar 2020 21:50:28 +0000"  >&lt;p&gt;As an update, independently of whether non-replicated collections get minimum visible snapshots set, the issue that was exposed due to taking IX locks instead of X locks for collections in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43859&quot; title=&quot;Use only MODE_IX locks for creating a new collection, and new db if needed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43859&quot;&gt;&lt;del&gt;SERVER-43859&lt;/del&gt;&lt;/a&gt; was that the non-replicated collections were accessible in the catalog prior to storage transaction commit. As of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46285&quot; title=&quot;Collections should not be visible in CollectionCatalog lookups until storage transaction commit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46285&quot;&gt;&lt;del&gt;SERVER-46285&lt;/del&gt;&lt;/a&gt;, this is no longer a concern.&lt;/p&gt;

&lt;p&gt;The issue that still exists however (and existed prior to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43859&quot; title=&quot;Use only MODE_IX locks for creating a new collection, and new db if needed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43859&quot;&gt;&lt;del&gt;SERVER-43859&lt;/del&gt;&lt;/a&gt;), is that non-replicated collections can get created without a minimum visible snapshot set, even after storage transaction commit. This issue has to do with our criteria for setting the minimum visible snapshot.&lt;/p&gt;

&lt;p&gt;This ticket (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44854&quot; title=&quot;Ensure collections with commit timestamps have appropriately set minimum visible snapshots by the time the collections are visible in the catalog&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44854&quot;&gt;&lt;del&gt;SERVER-44854&lt;/del&gt;&lt;/a&gt;) need only be concerned with collection visibility prior to storage transaction commit, and ensuring the minimum visible snapshot is set for all cases where we have a commit timestamp by the time the collection is visible in the catalog. Non-replicated collections do not have a commit timestamp, and will not necessarily have the minimum visible snapshot set. I&apos;ve filed &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46900&quot; title=&quot;Prohibit operations on system.profile inside of transactions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46900&quot;&gt;&lt;del&gt;SERVER-46900&lt;/del&gt;&lt;/a&gt; to address the interesting case there.&lt;/p&gt;</comment>
                            <comment id="2982121" author="xgen-internal-githook" created="Mon, 16 Mar 2020 19:53:51 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Maria van Keulen&apos;, &apos;username&apos;: &apos;mvankeulen94&apos;, &apos;email&apos;: &apos;maria@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44854&quot; title=&quot;Ensure collections with commit timestamps have appropriately set minimum visible snapshots by the time the collections are visible in the catalog&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44854&quot;&gt;&lt;del&gt;SERVER-44854&lt;/del&gt;&lt;/a&gt; Make stronger visibility guarantees for new collections&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ce57a85479032380593268db65dfc9441c65cd9a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ce57a85479032380593268db65dfc9441c65cd9a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2922909" author="maria.vankeulen" created="Mon, 2 Mar 2020 15:50:06 +0000"  >&lt;p&gt;We believe &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46285&quot; title=&quot;Collections should not be visible in CollectionCatalog lookups until storage transaction commit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46285&quot;&gt;&lt;del&gt;SERVER-46285&lt;/del&gt;&lt;/a&gt; should have addressed the issue for non-replicated collections not having their minVisibleSnapshots set by the time collections are visible in the catalog. &lt;/p&gt;

&lt;p&gt;The work for this ticket should be to confirm (possibly with an invariant) that all &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ca547df9510ec9a6dc28e6eabf1e8542870f2bd1/src/mongo/db/catalog/database_impl.cpp#L673&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&quot;special case&quot; collections&lt;/a&gt; that can potentially receive a null minVisibleSnapshot initially have an appropriately set minVisibleSnapshot by the time they are accessible in the catalog.&lt;/p&gt;</comment>
                            <comment id="2918076" author="maria.vankeulen" created="Fri, 28 Feb 2020 20:39:45 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46241&quot; title=&quot;Ensure minVisibleSnapshots of collections created in multi-document transactions are appropriately set by the time they are visible in the catalog&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46241&quot;&gt;&lt;del&gt;SERVER-46241&lt;/del&gt;&lt;/a&gt; will add a timestamp-related invariant. This invariant should be updated once the timestamping issues are resolved for non-replicated collections.&lt;/p&gt;</comment>
                            <comment id="2865077" author="maria.vankeulen" created="Tue, 11 Feb 2020 17:41:37 +0000"  >&lt;p&gt;This ticket should also ensure that it is not possible to create/write to non-replicated collections inside multi-document transactions.&lt;/p&gt;</comment>
                            <comment id="2567385" author="daniel.gottlieb@10gen.com" created="Tue, 26 Nov 2019 21:54:26 +0000"  >&lt;p&gt;The two angles I know of that can solve this problem:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Upgrade locks for those cases to MODE_X (reverting behavior)&lt;/li&gt;
	&lt;li&gt;Faking a timestamp value for &lt;tt&gt;minVisibleSnapshot&lt;/tt&gt;. Picking a value too large is safe, picking a value too small can lead to incorrect behavior.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;While it may be pleasing to use the same solution for both standalone mode and unreplicated collections in replica sets, my hunch is it might be easiest to solve them differently:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;I think having collection creation upconvert locks from MODE_IX to MODE_X on standalones might be easier than trying to introduce timestamps.&lt;/li&gt;
	&lt;li&gt;I think choosing &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3c77881955004780a8dd424434575f9dc0a5632d/src/mongo/db/catalog/uncommitted_collections.cpp#L70&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;fake timestamps for unreplicated collections&lt;/a&gt; in replica sets might be easier than knowing when to upconvert a lock to MODE_X.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1276424">SERVER-46900</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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></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, 26 Nov 2019 21:54:26 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 47 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-1168</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>
                            3 years, 47 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>maria.vankeulen@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hw6euf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hw7sg7:</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="3402">Execution Team 2019-12-30</customfieldvalue>
    <customfieldvalue id="3631">Execution Team 2020-03-09</customfieldvalue>
    <customfieldvalue id="3632">Execution Team 2020-03-23</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|hw613r:</customfieldvalue>

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