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

Create a ShardServerCatalogCacheLoader interface for its implementations

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • CAR Team 2024-10-28, CAR Team 2024-11-11, CAR Team 2024-11-25

      (Subtask to achieve SERVER-84243 - Dedicate a catalog cache and loader to the shard role. For more information refer to this document)

       

      Today, FilteringMetadataCache has a shared_ptr<CatalogCacheLoader> as member of the class, representing the ShardServerCatalogCacheLoader implementation, but accepting the injection of the CatalogCacheLoaderMock (testing purposes) or the ReadOnlyCatalogCacheLoader (queryableBackupMode).

      This implies having some dynamic cast - from the loader pointer to ShardServerCatalogCacheLoader - to use some of the methods only implemented by the last.

      The goal of this ticket is to create a better architecture, by creating a new interface that implements all the necessary methods that the FilteringMetadataCache’s loader needs, consequently removing all the dynamic casts, and breaking the dependency of the pareten interface CatalogCacheLoader.

      Therefore, today:

      • CatalogCacheLoader (Interface)
        • ConfigServerCatalogCacheLoader
        • ShardServerCatalogCacheLoader
        • ReadOnlyCatalogCacheLoader
        • CatalogCacheLoaderMock

      The proposed architecture is:

      • ConfigServerCatalogCacheLoader (Interface)
        • ConfigServerCatalogCacheLoaderImpl
        • ConfigServerCatalogCacheLoaderMock
      • ShardServerCatalogCacheLoader (Interface) -> deprecated once shards are authoritative
        • ShardServerCatalogCacheLoaderImpl
        • ReadOnlyCatalogCacheLoader
        • ShardServerCatalogCacheLoaderMock

       

      Open question: Do we want to rename the ShardServerCatalogCacheLoader and ConfigServerCatalogCacheLoader to RouterRoleCatalogCacheLoader and ShardRoleCatalogCacheLoader?

            Assignee:
            aitor.esteve@mongodb.com Aitor Esteve Alvarado
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: