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

Pavel Tupitsyn updated IGNITE-24138:
------------------------------------
    Fix Version/s: 3.0

> 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
>             Fix For: 3.0
>
>          Time Spent: 3h 10m
>  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)

Reply via email to