[SERVER-72720] Duplicated code in ShardingCatalogManager to serve the commit of addShard and createDatabase requests Created: 11/Jan/23  Updated: 22/Nov/23

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Paolo Polato Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: oldshardingemea
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Catalog and Routing
Participants:

 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.


Generated at Thu Feb 08 06:22:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.