[ https://issues.apache.org/jira/browse/IGNITE-20199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mirza Aliev resolved IGNITE-20199. ---------------------------------- Resolution: Won't Fix We decided that the chaining behaviour is the correct behaviour, because in general there is a problem of a reordering of messages when we try to call sendWithRetry, what can cause linearisation problems. For example, zone creation event and table creation events can be reordered, and if we handle this events asynchronously, we could be in a strange situation when table tries to use zone, that is not completely ready > Do not return updating rebalance assignments futures in > DistributionZoneRebalanceEngine#onUpdateReplicas > --------------------------------------------------------------------------------------------------------- > > Key: IGNITE-20199 > URL: https://issues.apache.org/jira/browse/IGNITE-20199 > Project: Ignite > Issue Type: Bug > Reporter: Mirza Aliev > Priority: Major > Labels: ignite-3 > > Seems that the current logic in > {{DistributionZoneRebalanceEngine#onUpdateReplicas}} is not correct in terms > of futures chaining. Currently we block configuration notification thread > until all partitions would updates theirs rebalance assignments keys in > metastorage. > > {code:java} > private CompletableFuture<?> > onUpdateReplicas(ConfigurationNotificationEvent<Integer> replicasCtx) { > ... > ... > return > distributionZoneManager.dataNodes(replicasCtx.storageRevision(), > zoneCfg.zoneId()) > .thenCompose(dataNodes -> { > ... > for (TableView tableCfg : tableViews) { > ... > CompletableFuture<?>[] partitionFutures = > RebalanceUtil.triggerAllTablePartitionsRebalance(...); > tableFutures.add(allOf(partitionFutures)); > } > return > allOf(tableFutures.toArray(CompletableFuture[]::new)); > }); > ... > } {code} > As a solution, we could just return completed future in the > {{DistributionZoneRebalanceEngine#onUpdateReplicas}} after we started > asynchronous logic of updating rebalance assignmnets. -- This message was sent by Atlassian Jira (v8.20.10#820010)