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


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -785,27 +796,63 @@ public void onError(Throwable e) {
     }
 
     /**
-     * Saves states of the Distribution Zone Manager to vault atomically in 
one batch.
+     * Update topology augmentation map with newly added and removed nodes.
+     *
+     * @param addedNodes Nodes that was added to a topology and should be 
added to zones data nodes.
+     * @param removedNodes Nodes that was removed from a topology and should 
be removed from zones data nodes.
+     * @param revision Revision of the event that triggered this method.
+     * @param zoneId Zone's id.
+     */
+    private void updateTopologyAugmentationMap(Set<Node> addedNodes, Set<Node> 
removedNodes, long revision, int zoneId) {
+        if (!addedNodes.isEmpty()) {
+            zonesState.get(zoneId).nodesToAddToDataNodes(addedNodes, revision);
+        }
+
+        if (!removedNodes.isEmpty()) {
+            zonesState.get(zoneId).nodesToRemoveFromDataNodes(removedNodes, 
revision);
+        }
+    }
+
+    /**
+     * Saves global states of the Distribution Zone Manager to Meta Storage 
atomically in one batch.
      * After restart it could be used to restore these fields.
      *
-     * @param newLogicalTopology Logical topology.
-     * @param revision Revision of the event, which triggers update.
-     * @param zoneIds Set of zone id's, whose states will be staved in the 
Vault
+     * @param zoneIds Set of zone id's, whose states will be staved in the 
Meta Storage.

Review Comment:
   staved -> saved



-- 
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