-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
CAR Team 2025-03-31
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
ChunkManager is a wrapper around RoutingTableHistory, pinning it to a specific point in time. Currently, for historical reasons, ChunkManager also includes the database's primary shard and version.
However, database metadata should not be encapsulated within ChunkManager. The proposed solution is to move this metadata to a higher layer of the routing information hierarchy, so collection metadata used for filtering metadata has no knowledge of the database metadata.
Current Structure:
CollectionRoutingInfo ├── (sii) ShardingIndexesCatalog ├── (cm) ChunkManager │ ├── DbPrimaryShard │ ├── DbVersion │ ├── RoutingTableHistory │ ├── ClusterTime
Proposed Solution:
CollectionRoutingInfo ├── (dbInfo) CachedDatabaseInfo │ ├── DbPrimaryShard │ ├── DbVersion ├── (sii) ShardingIndexesCatalog ├── (cm) ChunkManager │ ├── RoutingTableHistory │ ├── ClusterTime
This refactoring ensures that database metadata is stored in an appropriate layer, improving separation of concerns and maintainability.