kgusakov commented on code in PR #4675: URL: https://github.com/apache/ignite-3/pull/4675#discussion_r1836378391
########## modules/configuration-system/src/main/java/org/apache/ignite/internal/configuration/validation/NonNegativeIntegerNumberSystemPropertyValueValidator.java: ########## @@ -26,7 +26,8 @@ import org.apache.ignite.internal.configuration.SystemPropertyView; /** Validator for system property values that are expected to be non-negative {@code long} number. */ Review Comment: fixed ########## modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java: ########## @@ -375,6 +379,43 @@ private CompletableFuture<Void> onUpdateScaleUpBusy(AlterZoneEventParameters par return nullCompletedFuture(); } + private CompletableFuture<Void> onUpdatePartitionDistributionResetBusy(int partitionDistributionReset, long causalityToken) { + // It is safe to zoneState.entrySet in term of ConcurrentModification and etc. because meta storage notifications are one-threaded + // and this map will be initialized on a manager start or with catalog notification or with distribution configuration changes. + for (Map.Entry<Integer, ZoneState> zoneStateEntry : zonesState.entrySet()) { + int zoneId = zoneStateEntry.getKey(); + + if (partitionDistributionReset == IMMEDIATE_TIMER_VALUE) { + // TODO: IGNITE-23599 Implement valid behaviour here. + return nullCompletedFuture(); + } + + ZoneState zoneState = zoneStateEntry.getValue(); + + if (partitionDistributionReset != INFINITE_TIMER_VALUE) { + 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 + ); + + Review Comment: fixed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org