Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Further, unless otherwise stated, table will be used instead of intersection of table (group of table linked to the distribution zone) and storage engine.

Thus, two a new attributes are attribute is added to the table state:

  • primaryDistributionZone - link to the distribution zone that defines data nodes set for a primary storage. 
  • secondaryDistributionZone - link to the distribution zone that defines data nodes set for a secondary(replica) storage.

and new entity DistributionZone is introduced to hold, manage and atomically switch dataNodes[] attribute. 

...

Code Block
languagejava
titleTable
CREATE TABLE ... WITH PRIMARY_ZONE = primary_zone, SECONDARY_ZONE = secondary_zone;

Similar syntax is expected for altering table in order to modify primary or secondary zoneszone.

Distribution zones configuration internals

...

-1

start Node A;

start Node B;

start Node C;

CREATE ZONE zone1 WITH   DATA_NODES_AUTO_ADJUST_SCALE_UP = 300;

CREATE TABLE Accounts … WITH  PRIMARY_ZONE = zone1 

User starts three Ignite nodes A, B, C and creates table Accounts specifying scale up auto adjust timeout as 300 seconds. Accounts table is created on current topology, meaning that <Transaction>.dataNodes = [A,B,C]

0

start Node D ->

    Node D join/validation ->

    D enters logical topology ->

    logicalTopology.onNodeAdded(Node D) ->

    scale_up_auto_adjust(300) timer is

    scheduled for the <Accounts> table.

At time 0 seconds the user starts one more Ignite node D, that joins the cluster. On entering logical topology the onNodeAdded event is fired. This event schedules a timer of 300 seconds for table Accounts after which the dataNodes of that table transitively through the distribution zone will be recalculated from [A,B,C] to [A,B,C,D]



250

start Node E -> 

    scale_up_auto_adjust(300) is

    rescheduled for the <Accounts> table.

At 250 seconds one more node is added, that action reschedules scale_up_auto_adjust timer for another 300 seconds.

550

scale_up_auto_adjust fired ->

    set table.<Accounts>.dataNodes = 

    [NodeA, NodeB, NodeC, Node D, Node E]

At 550 seconds scale_up_time is fired, that leads to <Transaction>dataNodes recalculation by attaching the nodes that were added to logical topology - Nodes D and E in the given example.

600

start Node F ->

     <Accounts> table schedules   

     scale_up_auto_adjust(300);

At 600 seconds one more node is added, there are no active scale_up_auto_adjust timers, so given events schedules new one.

...