Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Done
-
None
-
None
-
None
Description
Motivation
IEP-97 introduces new concept of distribution zone along with some assumptions of a corresponding manager that will provide an API to create, alter, and drop zones. It's however an internal API and thus it's required to provide a public one:
CREATE ZONE { database_name.schema_name.distribution_zone_name | schema_name.distribution_zone_name | distribution_zone_name } [WITH [ <data_nodes_auto_adjust> | DATA_NODES_FILTER = filter | (<data_nodes_auto_adjust>, DATA_NODES_FILTER = filter) ], [PARTITIONS = partitions], [REPLICAS = replicas], [AFFINITY_FUNCTION = function] ] [;] <data_nodes_auto_adjust> ::= [ DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value | DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value | (DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value & DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value) | DATA_NODES_AUTO_ADJUST = auto_adjust_value ]
Few examples
Ex 1.1: CREATE ZONE zone1 WITH DATA_NODES_AUTO_ADJUST_SCALE_UP = 300, PARTITIONS = 1024, REPLICAS = 3, AFFINITY_FUNCTION = rendezvous; // Scale up only. Ex 1.2: CREATE ZONE zone2 WITH DATA_NODES_AUTO_ADJUST_SCALE_UP = 300, DATA_NODES_AUTO_ADJUST_SCALE_DOWN = 300; // Both scale up and scale down. Default partitions count, replicas count and affinity function will be used. Ex 1.3: CREATE ZONE zone2 WITH DATA_NODES_AUTO_ADJUST = 100; // Same value for both scale up and scale down. Default partitions count, replicas count and affinity function will be used. Ex 1.4: CREATE ZONES zone 4 WITH DATA_NODES_FILTER= ‘(“US” || “EU”) && “SSD”’; // Defail just node filters
And yes, similar syntax is expected for altering and dropping distribution zones.
Definition of Done
- It's possible to create/alter/drop distribution zones, meaning that corresponding methods of distribution zone manager are called.
- Exceptions if any, e.g. validation ones are properly wrapped and returned back to the user.
Attachments
Issue Links
- is blocked by
-
IGNITE-18093 Introduce distribution zone manager for the purposes of zones configuration
- Resolved