[
https://issues.apache.org/jira/browse/IGNITE-24138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17912783#comment-17912783
]
Pavel Tupitsyn commented on IGNITE-24138:
-----------------------------------------
Main:
https://github.com/apache/ignite-3/commit/48b06e03db7eb2edb0001080ee74a211848dde38
ignite-3.0:
https://github.com/apache/ignite-3/commit/59c0160a8aa7807ff59322e835f40380ef382558
> 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, important
> Fix For: 3.0
>
> Time Spent: 5h 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)