<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:33:00 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-76561] Lock-free acquisitions can read from sharded collection as unsharded when collection is dropped and recreated (ABA problem)</title>
                <link>https://jira.mongodb.org/browse/SERVER-76561</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This is hypothetical, we haven&apos;t tried to reproduce it.&lt;/p&gt;

&lt;p&gt;The scenario looks like this:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Collection exists and is unsharded.&lt;/li&gt;
	&lt;li&gt;Mongos attaches shard version UNSHARDED to the request.&lt;/li&gt;
	&lt;li&gt;acquireCollectionWithoutLocks checksShardingPlacement, it is correct.&lt;/li&gt;
	&lt;li&gt;Collection becomes sharded from some other client running shardCollection.&lt;/li&gt;
	&lt;li&gt;acquireCollectionWithoutLocks opens the snapshot at this point.&lt;/li&gt;
	&lt;li&gt;Collection is dropped from some other client running drop.&lt;/li&gt;
	&lt;li&gt;Collection is created again as unsharded from some other client running create.&lt;/li&gt;
	&lt;li&gt;acquireCollectionWithoutLocks checksShardingPlacement again and everything checks out because the request was sent with shard version UNSHARDED and the collection &lt;em&gt;is&lt;/em&gt; (again now) unsharded.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Currently &lt;a href=&quot;https://github.com/mongodb/mongo/blob/788248b98798044e325f30402ec3812a80dfbaf1/src/mongo/db/db_raii.cpp#L1082-L1105&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;we have a check&lt;/a&gt; to prevent this exact scenario described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62457&quot; title=&quot;Lock-free reads causes query subsystem to treat unsharded collection as sharded when collection is dropped and re-created (ABA problem)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62457&quot;&gt;&lt;del&gt;SERVER-62457&lt;/del&gt;&lt;/a&gt; in the AutoGetCollectionForLockFreeReads case, however it might be broken, see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-76559&quot; title=&quot;Lock-free reads can read from sharded collection as unsharded when collection is dropped and recreated (ABA problem)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-76559&quot;&gt;&lt;del&gt;SERVER-76559&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2324948">SERVER-76561</key>
            <summary>Lock-free acquisitions can read from sharded collection as unsharded when collection is dropped and recreated (ABA problem)</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="10033" iconUrl="https://jira.mongodb.org/images/icons/statuses/information.png" description="Status for tickets that need to be escalated and unblocked on our team.">Blocked</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-catalog-and-routing">Backlog - Catalog and Routing</assignee>
                                    <reporter username="daniel.gomezferro@mongodb.com">Daniel Gomez Ferro</reporter>
                        <labels>
                            <label>oldshardingemea</label>
                    </labels>
                <created>Wed, 26 Apr 2023 16:47:01 +0000</created>
                <updated>Thu, 26 Oct 2023 10:22:53 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5495484" author="JIRAUSER1263153" created="Tue, 13 Jun 2023 15:09:23 +0000"  >&lt;p&gt;We think this is too difficult to solve before PM-3364, and we can&apos;t run into the issue describe in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62457&quot; title=&quot;Lock-free reads causes query subsystem to treat unsharded collection as sharded when collection is dropped and re-created (ABA problem)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62457&quot;&gt;&lt;del&gt;SERVER-62457&lt;/del&gt;&lt;/a&gt; because we son&apos;t report the collection as being sharded unless we request it to be sharded.&lt;/p&gt;

&lt;p&gt;Closing this ticket.&lt;/p&gt;</comment>
                            <comment id="5378221" author="JIRAUSER1263153" created="Wed, 26 Apr 2023 16:48:28 +0000"  >&lt;p&gt;One possible solution is to get the collection UUID before the first shardingPlacementCheck and checking it again after opening the snapshot to verify we are dealing with the same collection throughout the execution of the acquisition.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1960475">SERVER-62457</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2324925">SERVER-76559</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_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>
                                        34 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<a href='https://jira.mongodb.org/browse/PM-3364'>PM-3364</a>]]></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>dbeng-pm-bot</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            34 weeks, 1 day 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>backlog-server-catalog-and-routing</customfieldvalue>
            <customfieldvalue>daniel.gomezferro@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i26gxb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1orr4:</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_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|i2632n:</customfieldvalue>

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