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


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java:
##########
@@ -160,10 +161,23 @@ static CompoundCondition 
triggerKeyConditionForZonesChanges(long revision, int z
      * @return Update condition.
      */
     static CompoundCondition triggerScaleUpScaleDownKeysCondition(long 
scaleUpTriggerRevision, long scaleDownTriggerRevision,  int zoneId) {
-        return and(
-                
value(zoneScaleUpChangeTriggerKey(zoneId)).eq(ByteUtils.longToBytes(scaleUpTriggerRevision)),
-                
value(zoneScaleDownChangeTriggerKey(zoneId)).eq(ByteUtils.longToBytes(scaleDownTriggerRevision))
-        );
+        SimpleCondition scaleUpCondition;
+
+        if (scaleUpTriggerRevision != 0) {

Review Comment:
   Why do you need this? I believe that we can explicitly generate notExists 
condition if there are no corresponding keys is ms. Meaning, that we don't need 
0 and/or empty map as a signal for emptiness. 



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