sergeyuttsel commented on code in PR #1572:
URL: https://github.com/apache/ignite-3/pull/1572#discussion_r1093455351


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -425,11 +431,48 @@ public TableManager(
                 new LinkedBlockingQueue<>(),
                 NamedThreadFactory.create(nodeName, "incoming-raft-snapshot", 
LOG)
         );
+
+        zonesWatchListener = new WatchListener() {
+            @Override
+            public void onUpdate(@NotNull WatchEvent evt) {
+                NamedConfigurationTree<TableConfiguration, TableView, 
TableChange> tables = tablesCfg.tables();
+
+                int zoneId = extractZoneId(evt.entryEvent().newEntry().key());
+
+                Set<String> nodesIds = 
ByteUtils.fromBytes(evt.entryEvent().newEntry().value());
+
+                for (int i = 0; i < tables.value().size(); i++) {
+                    TableView tableView = tables.value().get(i);
+
+                    int tableZoneId = tableView.zoneId();
+
+                    if (zoneId == tableZoneId) {
+                        TableConfiguration tableCfg = 
tables.get(tableView.name());
+
+                        for (int part = 0; part < tableView.partitions(); 
part++) {
+                            UUID tableId = ((ExtendedTableConfiguration) 
tableCfg).id().value();
+
+                            TablePartitionId replicaGrpId = new 
TablePartitionId(tableId, part);
+
+                            updatePendingAssignmentsKeys(tableView.name(), 
replicaGrpId, nodesIds, tableView.replicas(),

Review Comment:
   As was discussed I only added logging in case when the future from 
updatePendingAssignmentsKeys completed with exception.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to