You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Kirill Gusakov (Jira)" <ji...@apache.org> on 2025/01/13 12:49:00 UTC

[jira] [Updated] (IGNITE-24138) DistributionZoneManager.onUpdatePartitionDistributionResetBusy has the wrong highestRevision usage

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

Kirill Gusakov updated IGNITE-24138:
------------------------------------
    Ignite Flags:   (was: Docs Required,Release Notes Required)

> DistributionZoneManager.onUpdatePartitionDistributionResetBusy has the wrong highestRevision usage
> --------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-24138
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24138
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Kirill Gusakov
>            Assignee: Kirill Gusakov
>            Priority: Major
>              Labels: ignite-3
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> [DistributionZoneManager.onUpdatePartitionDistributionResetBusy|https://github.com/apache/ignite-3/blob/2a8d29f860aa1122130f037319a6bf5fee3d63ca/modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java#L416] has the issue with the following assertion:
> {code:java}
> Optional<Long> highestRevision = zoneState.highestRevision(true);
> assert highestRevision.isEmpty() || causalityToken >= highestRevision.get() : IgniteStringFormatter.format(
>         "Expected causalityToken that is greater or equal to already seen meta storage events: highestRevision={}, "
>                 + "causalityToken={}",
>         highestRevision.orElse(null), causalityToken
> );
> {code}
> The tricky part is {{zoneState.highestRevision(true)}} - actually we can't use the addition=true|false semantic here for this method, because it is a reset timer configuration update. Instead we should introduce and use here the general version:
> {code:java}
> Optional<Long> highestRevision() {
>     return topologyAugmentationMap().entrySet()
>             .stream()
>             .max(Map.Entry.comparingByKey())
>             .map(Map.Entry::getKey);
> }
> {code}



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