[SERVER-84243] Separate Shard-Role Catalog Cache and Loader Created: 15/Dec/23  Updated: 06/Feb/24

Status: In Progress
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: George Wangensteen Assignee: Antonio Fuschetto
Resolution: Unresolved Votes: 0
Labels: pm-635-milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-85370 Move rename precondition checks away ... Closed
depends on SERVER-85525 `collMod` coordinator can get the cur... Closed
is depended on by SERVER-83433 Add back the test coverage for runnin... Backlog
Gantt End to End
has to be finished together with SERVER-84247 Complete TODO listed in SERVER-82588 Closed
Related
related to SERVER-84548 Using ShardServerCatalogCacheLoader o... In Code Review
is related to SERVER-82588 Move CatalogCacheLoader to be a decor... Closed
is related to SERVER-82589 Move CatalogCache off of the Grid obj... Closed
Assigned Teams:
Catalog and Routing
Sprint: CAR Team 2024-01-08, CAR Team 2024-01-22, CAR Team 2024-02-05, CAR Team 2024-02-19
Participants:

 Description   

Today, mongod uses a single CatalogCache and CatalogCacheLoader for both it's shard-role responsibilities (i.e. updating the filtering metadata), and it's bespoke router-role support (i.e. routing cross-shard $lookup queries).

As we give mongod 'proper' routing support equivalent to the routing facilities mongos provides, we want to allow the routing layer to use a separate CatalogCache that is backed by a ConfigServerCatalogCacheLoader, so that routing operations do not need to stall waiting for replication. However, the shard-role use of the CatalogCache needs to continue to use CatalogCache backed by ShardServerCatalogCacheLoader, to ensure that the routing table view is consistent between primaries and secondaries on refresh.

To achieve this goal, we'll support two CatalogCache and CatalogCacheLoader instances in each mongod: one used for routing, and the other for shard-role activities. The use of the shard-role implementation should be very limited; essentially, only to filtering metadata updating. To implement this, we'll introduce a new CatalogCacheAndLoaderBackingShardRole object that encapsulates the shard-role state, and clarify that the CatalogCache available on the grid should be used exclusively for routing.



 Comments   
Comment by Kshitij Gupta [ 02/Feb/24 ]

SERVER-84548 is a temporary fix for this issue in 7.x versions while SERVER-84243 is a more permanent fix for 8.0.

Generated at Thu Feb 08 06:54:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.