[ 
https://issues.apache.org/jira/browse/IGNITE-19687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mirza Aliev updated IGNITE-19687:
---------------------------------
    Description: 
*Motivation.*
We have no reasonable arguments that we need a special distribution zone 
instance. All distribution zones are equals. Thus, conceptually, any zone can 
be used as default one and can be renamed.
For better UX, we still can require at least one distribution zone, which is 
currently assigned as default zone, must always exists.

Let's 
* Avoid using any hardcoded zone id or zone name for getting or detecting the 
default distribution zone.
* Distributed zone manager shouldn't care which zone is default. Catalog will 
be responsible for resolving default zone if it is not specified when table is 
creating.
* Add a property in Catalog that will store default zone by zone id.
* Forbid dropping of distribution zone, which is currently marked as default.

h3. *Implementation notes*

We need to enhance {{org.apache.ignite.internal.catalog.Catalog#Catalog}} with 
the default zone id, so when {{UpdateEntry#applyUpdate}} will recreate Catalog 
for a SQL command of setting default zone, the new zone id could be saved to 
Catalog state.
Also tests must be added here like tests for altering zone and checking that 
tables will use the new default zone, test validation for dropping of 
distribution zone, which is currently marked as default. 



  was:
*Motivation.*
We have no reasonable arguments that we need a special distribution zone 
instance. All distribution zones are equals. Thus, conceptually, any zone can 
be used as default one and can be renamed.
For better UX, we still can require at least one distribution zone, which is 
currently assigned as default zone, must always exists.

Let's 
* Avoid using any hardcoded zone id or zone name for getting or detecting the 
default distribution zone.
* Distributed zone manager shouldn't care which zone is default. Catalog will 
be responsible for resolving default zone if it is not specified when table is 
creating.
* Add a property in Catalog that will store default zone by zone id.
* Forbid dropping of distribution zone, which is currently marked as default.

h3. *Implementation notes*

We need to enhance {{org.apache.ignite.internal.catalog.Catalog#Catalog}} with 
the default zone id, so when {{UpdateEntry#applyUpdate}} will recreate Catalog 
for a SQL command of setting default zone, the new zone id could be saved to 
Catalog state.





> Support default distribution zone reassignment in Catalog
> ---------------------------------------------------------
>
>                 Key: IGNITE-19687
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19687
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3
>
> *Motivation.*
> We have no reasonable arguments that we need a special distribution zone 
> instance. All distribution zones are equals. Thus, conceptually, any zone can 
> be used as default one and can be renamed.
> For better UX, we still can require at least one distribution zone, which is 
> currently assigned as default zone, must always exists.
> Let's 
> * Avoid using any hardcoded zone id or zone name for getting or detecting the 
> default distribution zone.
> * Distributed zone manager shouldn't care which zone is default. Catalog will 
> be responsible for resolving default zone if it is not specified when table 
> is creating.
> * Add a property in Catalog that will store default zone by zone id.
> * Forbid dropping of distribution zone, which is currently marked as default.
> h3. *Implementation notes*
> We need to enhance {{org.apache.ignite.internal.catalog.Catalog#Catalog}} 
> with the default zone id, so when {{UpdateEntry#applyUpdate}} will recreate 
> Catalog for a SQL command of setting default zone, the new zone id could be 
> saved to Catalog state.
> Also tests must be added here like tests for altering zone and checking that 
> tables will use the new default zone, test validation for dropping of 
> distribution zone, which is currently marked as default. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to