kgusakov commented on code in PR #4803: URL: https://github.com/apache/ignite-3/pull/4803#discussion_r1873232349
########## modules/table/src/main/java/org/apache/ignite/internal/table/distributed/disaster/DisasterRecoveryManager.java: ########## @@ -248,29 +252,51 @@ public List<SystemView<?>> systemViews() { ); } + @TestOnly + public Map<UUID, CompletableFuture<Void>> ongoingOperationsById() { + return ongoingOperationsById; + } + private CompletableFuture<Boolean> onHaZoneTopologyReduce(HaZoneTopologyUpdateEventParams params) { int zoneId = params.zoneId(); long timestamp = params.timestamp(); CatalogZoneDescriptor zoneDescriptor = catalogManager.zone(zoneId, timestamp); int catalogVersion = catalogManager.activeCatalogVersion(timestamp); + long revision = metaStorageManager.revisionByTimestampLocally(HybridTimestamp.hybridTimestamp(timestamp)); Review Comment: Done. Redundant changes on metastorage removed also. ########## modules/table/src/main/java/org/apache/ignite/internal/table/distributed/disaster/DisasterRecoveryManager.java: ########## @@ -248,29 +252,51 @@ public List<SystemView<?>> systemViews() { ); } + @TestOnly + public Map<UUID, CompletableFuture<Void>> ongoingOperationsById() { + return ongoingOperationsById; + } + private CompletableFuture<Boolean> onHaZoneTopologyReduce(HaZoneTopologyUpdateEventParams params) { int zoneId = params.zoneId(); long timestamp = params.timestamp(); CatalogZoneDescriptor zoneDescriptor = catalogManager.zone(zoneId, timestamp); int catalogVersion = catalogManager.activeCatalogVersion(timestamp); + long revision = metaStorageManager.revisionByTimestampLocally(HybridTimestamp.hybridTimestamp(timestamp)); List<CatalogTableDescriptor> tables = findTablesByZoneId(zoneId, catalogVersion, catalogManager); List<CompletableFuture<Void>> tablesResetFuts = new ArrayList<>(); for (CatalogTableDescriptor table : tables) { Set<Integer> partitionsToReset = new HashSet<>(); for (int partId = 0; partId < zoneDescriptor.partitions(); partId++) { - // TODO: https://issues.apache.org/jira/browse/IGNITE-23599 implement check for majority loss - partitionsToReset.add(partId); + TablePartitionId partitionId = new TablePartitionId(table.id(), partId); + + if (stableAssignmentsWithOnlyAliveNodes(partitionId, revision).size() < zoneDescriptor.replicas() / 2 + 1) { Review Comment: Added -- 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