rpuch commented on code in PR #5824: URL: https://github.com/apache/ignite-3/pull/5824#discussion_r2099946951
########## modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/RebalanceRaftGroupEventsListener.java: ########## @@ -276,31 +265,53 @@ private void scheduleChangePeersAndLearners(PeersAndLearners peersAndLearners, l private void doStableKeySwitch( Set<Assignment> stableFromRaft, TablePartitionId tablePartitionId, - MetaStorageManager metaStorageMgr, long configurationTerm, long configurationIndex, BiFunction<TablePartitionId, Long, CompletableFuture<Set<Assignment>>> calculateAssignmentsFn ) { - try { - ByteArray pendingPartAssignmentsKey = pendingPartAssignmentsQueueKey(tablePartitionId); - ByteArray stablePartAssignmentsKey = stablePartAssignmentsKey(tablePartitionId); - ByteArray plannedPartAssignmentsKey = plannedPartAssignmentsKey(tablePartitionId); - ByteArray switchReduceKey = switchReduceKey(tablePartitionId); - ByteArray switchAppendKey = switchAppendKey(tablePartitionId); - ByteArray assignmentsChainKey = assignmentsChainKey(tablePartitionId); - - // TODO: https://issues.apache.org/jira/browse/IGNITE-17592 Remove synchronous wait - Map<ByteArray, Entry> values = metaStorageMgr.getAll( - Set.of( - plannedPartAssignmentsKey, - pendingPartAssignmentsKey, - stablePartAssignmentsKey, - switchReduceKey, - switchAppendKey, - assignmentsChainKey - ) - ).get(); + doStableKeySwitchImpl( + stableFromRaft, + tablePartitionId, + configurationTerm, + configurationIndex, + calculateAssignmentsFn + ).whenComplete((res, ex) -> { + // TODO: IGNITE-14693 + if (ex != null && !hasCause(ex, NodeStoppingException.class)) { + if (hasCause(ex, TimeoutException.class)) { Review Comment: I don't guarantee this. It was agreed to ignore TimeoutException for now (to avoid situations where a missing/lagging Metastore makes nodes stop). The proper mechanism to recover from such situations will be implemented in [IGNITE-25276](https://issues.apache.org/jira/browse/IGNITE-25276) -- 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