Duplicated code in ShardingCatalogManager to serve the commit of addShard and createDatabase requests

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The commit phase of enableSharding is currently implemented by ShardingCatalogManager::createDatabase() and includes logic to:

      • perform initial checks on the received parameters
      • validate that the incoming request does not conflict with already persisted namespaces
      • perform the needed insertions into the sharding catalog

      Some very similar logic is also implemented within ShardingCatalogManager::addShard() to import the set of databases stored in the shard being added.

      A common function could be extracted to remove duplicated code.

            Assignee:
            [DO NOT USE] Backlog - Catalog and Routing
            Reporter:
            Paolo Polato
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: