<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:53:06 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-61700] Implement TenantToShardCache::getShard</title>
                <link>https://jira.mongodb.org/browse/SERVER-61700</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Implement TenantToShardCache::getShard(OID&amp;amp; tenantId) to load the shard for the tenant from config.tenants on the config servers.&lt;/p&gt;

&lt;p&gt;For this ticket, we can give TenantToShardCache a private map from tenantId (OID) to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/eb85f47359a482322222ccb5745b8c1109350752/src/mongo/s/shard_id.h#L43&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ShardId&lt;/a&gt;. getShard can simply look up from this map. In a future ticket, we will replace the private map with a private ReadThroughCache.&lt;/p&gt;

&lt;p&gt;If there is no entry in the map, TenantToShardCache::getShard should load the entry from config.tenants, which is currently on the config servers. To do this, TenantToShardCache::getShard can call a new method similar to&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/703fb345ce17aa27392230bdd7f09f29d0c526da/src/mongo/s/catalog/sharding_catalog_client_impl.cpp#L417-L434&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ShardingCatalogClient::getCollection&lt;/a&gt;, which reads from config.collections on the config servers.&lt;/p&gt;

&lt;p&gt;This ticket should add a unit test of TenantToShardCache::getShard, and can use catalog_cache_test.cpp&apos;s&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/703fb345ce17aa27392230bdd7f09f29d0c526da/src/mongo/s/catalog_cache_test.cpp#L183&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;GetDatabase&lt;/a&gt; and&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/703fb345ce17aa27392230bdd7f09f29d0c526da/src/mongo/s/catalog_cache_test.cpp#L199&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;GetCachedDatabase&lt;/a&gt; as examples.&lt;/p&gt;

&lt;p&gt;&#8211;&lt;/p&gt;

&lt;p&gt;Additional implementation notes:&lt;/p&gt;

&lt;p&gt;1. The ObjectId type in cpp is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c07540fefab04df035434955230f95a1d6297ed6/src/mongo/bson/oid.h#L73&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;OID&lt;/a&gt;. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c07540fefab04df035434955230f95a1d6297ed6/src/mongo/db/timeseries/bucket_catalog.h#L780&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Here&lt;/a&gt; is an example of a hash map keyed by OID.&lt;/p&gt;

&lt;p&gt;2. ShardingCatalogClient::getCollection returns a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bce4dd09506a4838bd3e4ee8ca37eeb5d5c6e5b7/src/mongo/s/catalog/type_collection.h#L78&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CollectionType&lt;/a&gt;, which is parser and serializer in &lt;b&gt;cpp&lt;/b&gt;. It wraps &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bce4dd09506a4838bd3e4ee8ca37eeb5d5c6e5b7/src/mongo/s/catalog/type_collection.idl#L49&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CollectionTypeBase&lt;/a&gt;, which is a parser and serializer in &lt;b&gt;IDL&lt;/b&gt;. We should create a TenantType, and use IDL. TenantType should contain a tenant id of IDL type &apos;objectid&apos;&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/bce4dd09506a4838bd3e4ee8ca37eeb5d5c6e5b7/src/mongo/s/catalog/type_collection.idl#L61&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;(example&lt;/a&gt;) and shard id of IDL type &apos;shard_id&apos; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bce4dd09506a4838bd3e4ee8ca37eeb5d5c6e5b7/src/mongo/s/catalog/type_chunk_base.idl#L47&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;(example&lt;/a&gt;). &apos;objectid&apos;&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/bce4dd09506a4838bd3e4ee8ca37eeb5d5c6e5b7/src/mongo/idl/basic_types.idl#L176&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;converts to OID&lt;/a&gt; in cpp, and &apos;shard_id&apos; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bce4dd09506a4838bd3e4ee8ca37eeb5d5c6e5b7/src/mongo/s/sharding_types.idl#L43&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;converts to ShardId&lt;/a&gt; in cpp.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1931256">SERVER-61700</key>
            <summary>Implement TenantToShardCache::getShard</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="4">Incomplete</resolution>
                                        <assignee username="backlog-server-serverless">[DO NOT USE] Backlog - Server Serverless</assignee>
                                    <reporter username="esha.maharishi@mongodb.com">Esha Maharishi</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Nov 2021 18:00:11 +0000</created>
                <updated>Tue, 6 Dec 2022 00:46:12 +0000</updated>
                            <resolved>Thu, 6 Jan 2022 19:24:04 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4260713" author="JIRAUSER1262621" created="Mon, 20 Dec 2021 22:26:05 +0000"  >&lt;p&gt;Blocking this Jira following up our conversation about options we have for serverless architecture plans.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25131"><![CDATA[Serverless]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 20 Dec 2021 22:26:05 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 7 weeks, 2 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2477</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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 7 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-serverless</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>mathis.bessa@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0ba8n:</customfieldvalue>

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

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