[
https://issues.apache.org/jira/browse/IGNITE-18516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17656612#comment-17656612
]
Ivan Bessonov commented on IGNITE-18516:
----------------------------------------
By the way - we could assert or otherwise check if developers tries to access
non-view configuration from closures, all we need for that is a thread-local
state. I expect that we would find quite a few data races. We better prevent
that
> 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)