Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Catalog and Routing
Description
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.