sanpwc commented on code in PR #1797:
URL: https://github.com/apache/ignite-3/pull/1797#discussion_r1141899075


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -1447,4 +1448,20 @@ private static class Augmentation {
             this.addition = addition;
         }
     }
+
+    private static Map<String, Integer> extractDataNodes(Entry dataNodesEntry) 
{
+        if (!dataNodesEntry.empty()) {
+            return fromBytes(dataNodesEntry.value());
+        } else {
+            return emptyMap();
+        }
+    }
+
+    private static long extractChangeTriggerRevision(Entry revisionEntry) {
+        if (!revisionEntry.empty()) {
+            return bytesToLong(revisionEntry.value());
+        } else {
+            return 0;

Review Comment:
   It's not clear, and thus a bit unreliable that zero here is the same zero 
you use in DistributionZoneUtils
   `if (scaleUpTriggerRevision != 0)` Let's use constant, e.g. 
INITIAL_TRIGGER_REVISION_VALUE or similar.



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