Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-18140

Add ability to create, alter and drop distribution zones from within sql-like public API

    XMLWordPrintableJSON

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

          Activity

            People

              jooger Iurii Gerzhedovich
              alapin Alexander Lapin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 10m
                  4h 10m