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

Mirza Aliev updated IGNITE-20199:
---------------------------------
    Summary: Do not return updating rebalance assignments futures in 
DistributionZoneRebalanceEngine#onUpdateReplicas   (was: Do not return updating 
rebalance assignments future in 
DistributionZoneRebalanceEngine#onUpdateReplicas )

> 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)

Reply via email to