<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:57:46 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-85442] Collection not found in CollectionCatalog during oplog entry application on a server replica in secondary mode</title>
                <link>https://jira.mongodb.org/browse/SERVER-85442</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Context:&#160;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href=&quot;https://spruce.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_80_64_bit_dynamic_serverless_patch_1616be2cb2b3f26ae85e1b8ff5d6d7d9816a2131_65a9384957e85accbd5d5244_24_01_18_14_42_00&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;A patch&lt;/a&gt; fails consistently on the Evergreen (a failure is not in a released version of the server nor a main branch).&lt;/li&gt;
	&lt;li&gt;The server is tested in multi-tenant mode.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The patch content:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Server is changed to acquire stronger tenant level lock when change stream pre-images collection is created/dropped.&lt;/li&gt;
	&lt;li&gt;The test verifies that actually the lock is taken and insert operation on change stream pre-images collection blocks.&lt;/li&gt;
	&lt;li&gt;There are no changes elsewhere except some instrumentation to help the investigation.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Defect symptoms:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The test jstests/serverless/change_stream_pre_images_collection_concurrency.js in the patch triggers a failure on the secondary node &lt;a href=&quot;https://parsley.mongodb.com/resmoke/bb0cdbc06d7a6dd9c7e43d3585b6338f/test/17ab7bfbfdf347d24d5f30a1a41ed5fa?bookmarks=0%2C321%2C12276%2C15034&amp;amp;filters=100d25791&amp;amp;selectedLineRange=L12253-L12276&amp;amp;shareLine=12253&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://parsley.mongodb.com/resmoke/bb0cdbc06d7a6dd9c7e43d3585b6338f/test/17ab7bfbfdf347d24d5f30a1a41ed5fa?bookmarks=0%2C321%2C12276%2C15034&amp;amp;filters=100d25791&amp;amp;selectedLineRange=L12253-L12276&amp;amp;shareLine=12253&lt;/a&gt; at a point where an update to a test collection is applied which entails writing to the change stream pre-images collection.&lt;/li&gt;
	&lt;li&gt;The defect is not reliably reproducible on a workstation (I was able to do that on one instance of my workstation, but failed on a new one - thus my step to pass the investigation to owners of CollectionCatalog), but seems to consistently fail on the Evergreen. Therefore it feels like a race condition defect.&lt;/li&gt;
	&lt;li&gt;It seems that CollectionCatalog state changes between &lt;a href=&quot;https://github.com/10gen/mongo/blob/e627a7d75870a18ed4dea1f6b7d874597d45d5ed/src/mongo/db/change_stream_pre_images_collection_manager.cpp#L229-L235&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/blob/e627a7d75870a18ed4dea1f6b7d874597d45d5ed/src/mongo/db/change_stream_pre_images_collection_manager.cpp#L229-L235&lt;/a&gt; and &lt;a href=&quot;https://github.com/10gen/mongo/blob/e627a7d75870a18ed4dea1f6b7d874597d45d5ed/src/mongo/db/change_stream_pre_images_collection_manager.cpp#L242-L244&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/blob/e627a7d75870a18ed4dea1f6b7d874597d45d5ed/src/mongo/db/change_stream_pre_images_collection_manager.cpp#L242-L244&lt;/a&gt; - the change stream pre-images collection does not exist at &lt;a href=&quot;https://github.com/10gen/mongo/blob/e627a7d75870a18ed4dea1f6b7d874597d45d5ed/src/mongo/db/change_stream_pre_images_collection_manager.cpp#L229-L235&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/blob/e627a7d75870a18ed4dea1f6b7d874597d45d5ed/src/mongo/db/change_stream_pre_images_collection_manager.cpp#L229-L235&lt;/a&gt;, but then appears at &lt;a href=&quot;https://github.com/10gen/mongo/blob/e627a7d75870a18ed4dea1f6b7d874597d45d5ed/src/mongo/db/change_stream_pre_images_collection_manager.cpp#L237-L239&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/blob/e627a7d75870a18ed4dea1f6b7d874597d45d5ed/src/mongo/db/change_stream_pre_images_collection_manager.cpp#L237-L239&lt;/a&gt;. However, the change stream pre-images collection should be present in the CollectionCatalog at all times, since it has been replicated previously. Thus two problems: the creation of change stream pre-images collection is not visible; and CollectionCatalog state seems to change when it should not. Note that change_stream_serverless_helpers::isChangeStreamEnabled() inquires the CollectionCatalog to check it the change stream pre-images collection exists.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Hypotheses rejected: &lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Application of oplog entries seem to be correct - creation of change stream pre-images collection happens in its own batch before the update operation is applied.&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="2551129">SERVER-85442</key>
            <summary>Collection not found in CollectionCatalog during oplog entry application on a server replica in secondary mode</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="jordi.olivares-provencio@mongodb.com">Jordi Olivares Provencio</assignee>
                                    <reporter username="mindaugas.malinauskas@mongodb.com">Mindaugas Malinauskas</reporter>
                        <labels>
                            <label>car-investigation</label>
                    </labels>
                <created>Fri, 19 Jan 2024 13:37:42 +0000</created>
                <updated>Fri, 26 Jan 2024 10:38:13 +0000</updated>
                                            <version>7.3.0-rc0</version>
                                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="2377214">SERVER-78440</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>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26387"><![CDATA[Catalog and Routing]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_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>tommaso.tocci@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>jordi.olivares-provencio@mongodb.com</customfieldvalue>
            <customfieldvalue>mindaugas.malinauskas@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i394iv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2qtn0:</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Run test jstests/serverless/change_stream_pre_images_collection_concurrency.js in patch &lt;a href=&quot;https://spruce.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_80_64_bit_dynamic_serverless_patch_1616be2cb2b3f26ae85e1b8ff5d6d7d9816a2131_65a9384957e85accbd5d5244_24_01_18_14_42_00?execution=0&amp;amp;sortBy=STATUS&amp;amp;sortDir=ASC&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://spruce.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_80_64_bit_dynamic_serverless_patch_1616be2cb2b3f26ae85e1b8ff5d6d7d9816a2131_65a9384957e85accbd5d5244_24_01_18_14_42_00?execution=0&amp;amp;sortBy=STATUS&amp;amp;sortDir=ASC&lt;/a&gt;.&lt;/p&gt;</customfieldvalue>

                        </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|i38qo7:</customfieldvalue>

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