<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:26: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-31191] Store the collection UUIDs in the CatalogCache</title>
                <link>https://jira.mongodb.org/browse/SERVER-31191</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When you call &lt;tt&gt;CatalogCache::getCollectionRoutingInfo()&lt;/tt&gt;, the result should include the collection UUID. &lt;/p&gt;

&lt;p&gt;This is needed for the change streams project, so that when parsing the shard key from an insert entry, we can be sure we have the correct shard key for the collection according to its UUID. We wish to avoid errors where if a collection is dropped and recreated with a different shard key, we extract the wrong shard key from the insert entry.&lt;/p&gt;

&lt;p&gt;This can be accomplished by including the UUID in the &lt;tt&gt;CollectionAndChangedChunks&lt;/tt&gt; and copying it into the &lt;tt&gt;ChunkManager&lt;/tt&gt; in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/60c35fd35f5d1d9d3c2b11d56ee46e95e8a94c04/src/mongo/s/catalog_cache.cpp#L70&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;refreshCollectionRoutingInfo()&lt;/tt&gt;&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;On a primary, we populate &lt;tt&gt;CollectionAndChangedChunks&lt;/tt&gt; in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/60c35fd35f5d1d9d3c2b11d56ee46e95e8a94c04/src/mongo/s/config_server_catalog_cache_loader.cpp#L90&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;getChangedChunks()&lt;/tt&gt;&lt;/a&gt;. We can copy the UUID from the &lt;tt&gt;CollectionType&lt;/tt&gt; into the &lt;tt&gt;CollectionAndChangedChunks&lt;/tt&gt; in that function.&lt;/p&gt;

&lt;p&gt;On a secondary, we populate the &lt;tt&gt;CollectionAndChangedChunks&lt;/tt&gt; from the shard server&apos;s &lt;tt&gt;config.collections&lt;/tt&gt; collection in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/60c35fd35f5d1d9d3c2b11d56ee46e95e8a94c04/src/mongo/db/s/shard_server_catalog_cache_loader.cpp#L174&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;getPersistedMetadataSinceVersion()&lt;/tt&gt;&lt;/a&gt;. Unfortunately, the shard server&apos;s &lt;tt&gt;config.collections&lt;/tt&gt; collection does not include the UUID. In 3.8, we intend to have the &lt;tt&gt;_id&lt;/tt&gt; be the UUID. However, for 3.6, we have approval from &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dianna.hohensee&quot; class=&quot;user-hover&quot; rel=&quot;dianna.hohensee&quot;&gt;dianna.hohensee&lt;/a&gt; to add an extra optional field for the UUID.&lt;/p&gt;</description>
                <environment></environment>
        <key id="430121">SERVER-31191</key>
            <summary>Store the collection UUIDs in the CatalogCache</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="nathan.myers">Nathan Myers</assignee>
                                    <reporter username="tess.avitabile@mongodb.com">Tess Avitabile</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Sep 2017 21:10:21 +0000</created>
                <updated>Mon, 30 Oct 2023 23:13:27 +0000</updated>
                            <resolved>Tue, 17 Oct 2017 18:29:23 +0000</resolved>
                                                    <fixVersion>3.6.0-rc1</fixVersion>
                                    <component>Replication</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1701624" author="xgen-internal-githook" created="Tue, 17 Oct 2017 18:18:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;nathan.myers@10gen.com&apos;, &apos;name&apos;: &apos;Nathan Myers&apos;, &apos;username&apos;: &apos;nathan-myers-mongo&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31191&quot; title=&quot;Store the collection UUIDs in the CatalogCache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31191&quot;&gt;&lt;del&gt;SERVER-31191&lt;/del&gt;&lt;/a&gt; Plumb Collection UUIDs through catalog cache&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/aeabbf96ff3c2990f553ba0a5e6e1d18ebddab2f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/aeabbf96ff3c2990f553ba0a5e6e1d18ebddab2f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1679962" author="dianna.hohensee" created="Fri, 22 Sep 2017 20:27:38 +0000"  >&lt;p&gt;Ah, whoops, you&apos;re talking about adding a new field, not using _id. Well, as it currently works, metadata is persisted to config.collections on the shard before fcv 3.6 is set, so the _id field cannot be uuid before they exist. Only choice is to add a new &apos;uuid&apos; field. Sounds good. I can&apos;t think of any issues: we don&apos;t really have any detailed plans for how to use uuid in sharding. We probably already will have to update the schema in the v3.6 - &amp;gt; v3.8 upgrade regardless.&lt;/p&gt;</comment>
                            <comment id="1679955" author="dianna.hohensee" created="Fri, 22 Sep 2017 20:12:23 +0000"  >&lt;p&gt;I think adding the UUID should be pretty straightforward as well: there&apos;s already a placeholder waiting in ShardCollectionType. (We actually have &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30548&quot; title=&quot;Remove ShardCollectionType::uuid field&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30548&quot;&gt;&lt;del&gt;SERVER-30548&lt;/del&gt;&lt;/a&gt; to remove it &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;). It may just be a matter of: swapping out the redundant string for the uuid, and switching any existing ShardCollectionType::getUUID() callers to ShardCollectionType::getNss(); then adding UUID to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c4b90fe5509eb70e4009e0d7ddbd71b4b92d0274/src/mongo/s/catalog_cache_loader.h#L68-L85&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CollectionAndChangedChunks&lt;/a&gt; to carry up the value from the refresh logic to the in-memory cache.&lt;/p&gt;

&lt;p&gt;So the idea is that you have a uuid, then you read something new later and want to refresh to make sure the uuid still matches?&lt;/p&gt;</comment>
                            <comment id="1679931" author="kaloian.manassiev" created="Fri, 22 Sep 2017 19:47:31 +0000"  >&lt;p&gt;Yes. I don&apos;t see a harm in storing the UUID there, but double-check with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dianna.hohensee&quot; class=&quot;user-hover&quot; rel=&quot;dianna.hohensee&quot;&gt;dianna.hohensee&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1679900" author="tess.avitabile" created="Fri, 22 Sep 2017 19:03:36 +0000"  >&lt;p&gt;Like add an optional UUID field in the shard server&apos;s &lt;tt&gt;config.collections&lt;/tt&gt; that is distinct from the &lt;tt&gt;_id&lt;/tt&gt;? If that is acceptable to you, that would be great. I just don&apos;t want to mess up the schema for you.&lt;/p&gt;</comment>
                            <comment id="1679871" author="kaloian.manassiev" created="Fri, 22 Sep 2017 18:33:59 +0000"  >&lt;p&gt;It shouldn&apos;t be difficult to add the UUID to &lt;tt&gt;config.collections&lt;/tt&gt; using the same logic as that in CatalogCache. In 3.8 we wanted to start naming the collections using their UUID, but perhaps if that would help ChangeStreams, we could just include the UUID along with the epoch?&lt;/p&gt;</comment>
                            <comment id="1679865" author="tess.avitabile" created="Fri, 22 Sep 2017 18:26:58 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=spencer&quot; class=&quot;user-hover&quot; rel=&quot;spencer&quot;&gt;spencer&lt;/a&gt;, I&apos;m currently blocked on this issue, since on secondaries, we populate the &lt;tt&gt;CatalogCache&lt;/tt&gt; from the shard server&apos;s &lt;tt&gt;config.collections&lt;/tt&gt;, and the shard server&apos;s &lt;tt&gt;config.collections&lt;/tt&gt; does not contain the collection UUID. I believe we intend to add the UUID to the shard server&apos;s &lt;tt&gt;config.collections&lt;/tt&gt; in 3.8 (is that correct, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dianna.hohensee&quot; class=&quot;user-hover&quot; rel=&quot;dianna.hohensee&quot;&gt;dianna.hohensee&lt;/a&gt;?).&lt;/p&gt;

&lt;p&gt;If we need sharded change streams to be supported on secondaries in 3.6, then we may wish to add the UUID to the shard server&apos;s &lt;tt&gt;config.collections&lt;/tt&gt; in 3.6 when it exists. Alternatively, the mongos could include the shard key in the aggregation command it sends to the shards (though it would also need to send the UUID, to avoid a mismatch).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="413802">SERVER-30548</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="430129">SERVER-31192</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="426060">SERVER-31027</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="444717">SERVER-31540</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="446804">SERVER-31605</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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>2.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>Fri, 22 Sep 2017 18:33:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 17 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_14262" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 26 Sep 2017 00:00:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-89</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>
                            6 years, 17 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>nathan.myers</customfieldvalue>
            <customfieldvalue>tess.avitabile@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htf8zr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|ht72jb:</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="1893">Repl 2017-10-02</customfieldvalue>
    <customfieldvalue id="1915">Repl 2017-10-23</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 20 Sep 2017 00:00:00 +0000</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|htev33:</customfieldvalue>

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