[ 
https://issues.apache.org/jira/browse/IGNITE-18516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17656600#comment-17656600
 ] 

Ivan Bessonov commented on IGNITE-18516:
----------------------------------------

How I see it:

there should be a general method for updating configuration in the 
configuration registry. It provides something like SuperRoot (we can reuse this 
name, for convenience) and it would give two things:
 * ability to read a tree by its root key - returns *View instance
 * ability to change a tree by its root key - returns *Change instance

That should be enough. Providing other type of synchronization with outer world 
seems dangerous and less predictable. API will become less intuitive for such 
operations, but we can tolerate it, it's not too bad.

> Access to several configuration tree in one configuration change clojure is 
> not thread-safe
> -------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-18516
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18516
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Sergey Uttsel
>            Priority: Major
>              Labels: ignite-3
>
> h3. Motivation
> In some cases in a change clojure on one configuration tree we need a 
> thread-safe access to another configuration tree.
> For example:
> {code:java}
> zonesConfiguration.change(zonesChange ->
>     zonesChange.changeDistributionZones(zonesListChange -> {
>         tables = tablesConfiguration.tables();
>         boundTables = //find tables which are bound to the distribution zone;
>         if (boundTables.isEmpty())
>             zonesListChange.delete(zoneName);
> })) {code}
> Now there is no guarantee that list of boundTables is not changed before drop 
> zone.
> h3. Definition of Done
> It is possible to get thread-safe access to several configuration tree in one 
> configuration change clojure.



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

Reply via email to