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

Kirill Gusakov updated IGNITE-24060:
------------------------------------
    Description: 
During the IGNITE-24018 we discovered, that scale down is not working for HA 
zones. The root cause is the following code in 
[DistributionZoneManager|https://github.com/apache/ignite-3/blob/main/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java#L980]

{code:java}
if (nodesRemoved) {
    if (zone.consistencyMode() == HIGH_AVAILABILITY) {
        if (partitionReset != INFINITE_TIMER_VALUE) {
            zonesState.get(zoneId).reschedulePartitionDistributionReset(
                    partitionReset,
                    () -> fireTopologyReduceLocalEvent(revision, zoneId),
                    zoneId
            );
        }
    } else {
        if (autoAdjustScaleDown == IMMEDIATE_TIMER_VALUE) {
            futures.add(saveDataNodesToMetaStorageOnScaleDown(zoneId, 
revision));
        }

        if (autoAdjustScaleDown != INFINITE_TIMER_VALUE) {
            zonesState.get(zoneId).rescheduleScaleDown(
                    autoAdjustScaleDown,
                    () -> saveDataNodesToMetaStorageOnScaleDown(zoneId, 
revision),
                    zoneId
            );
        }
    }
}
{code}

*Definition of done*
* Scaledown timers are working for HA case also and appropriate tests added


> Scale down timer are not working for HA zones
> ---------------------------------------------
>
>                 Key: IGNITE-24060
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24060
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Kirill Gusakov
>            Assignee: Kirill Gusakov
>            Priority: Major
>              Labels: ignite-3
>
> During the IGNITE-24018 we discovered, that scale down is not working for HA 
> zones. The root cause is the following code in 
> [DistributionZoneManager|https://github.com/apache/ignite-3/blob/main/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java#L980]
> {code:java}
> if (nodesRemoved) {
>     if (zone.consistencyMode() == HIGH_AVAILABILITY) {
>         if (partitionReset != INFINITE_TIMER_VALUE) {
>             zonesState.get(zoneId).reschedulePartitionDistributionReset(
>                     partitionReset,
>                     () -> fireTopologyReduceLocalEvent(revision, zoneId),
>                     zoneId
>             );
>         }
>     } else {
>         if (autoAdjustScaleDown == IMMEDIATE_TIMER_VALUE) {
>             futures.add(saveDataNodesToMetaStorageOnScaleDown(zoneId, 
> revision));
>         }
>         if (autoAdjustScaleDown != INFINITE_TIMER_VALUE) {
>             zonesState.get(zoneId).rescheduleScaleDown(
>                     autoAdjustScaleDown,
>                     () -> saveDataNodesToMetaStorageOnScaleDown(zoneId, 
> revision),
>                     zoneId
>             );
>         }
>     }
> }
> {code}
> *Definition of done*
> * Scaledown timers are working for HA case also and appropriate tests added



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

Reply via email to