-
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.