Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-102710

Make ChunkManager stop storing database metadata

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • 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.

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: