tkalkirill commented on code in PR #2462:
URL: https://github.com/apache/ignite-3/pull/2462#discussion_r1299728502


##########
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/CatalogManagerValidationTest.java:
##########
@@ -157,24 +157,14 @@ void testValidateDataNodesAutoAdjustOnCreateZone() {
                 willThrowFast(CatalogValidationException.class, "Invalid data 
nodes auto adjust")
         );
 
-        // Let's check the success cases.
-        assertThat(
-                manager.createZone(createZoneBuilder(ZONE_NAME + 
0).dataNodesAutoAdjust(0).build()),
-                willBe(nullValue())
-        );
-
-        assertThat(
-                manager.createZone(createZoneBuilder(ZONE_NAME + 
1).dataNodesAutoAdjust(Integer.MAX_VALUE).build()),
-                willBe(nullValue())
-        );
-
         assertThat(
-                manager.createZone(createZoneBuilder(ZONE_NAME + 
2).dataNodesAutoAdjust(IMMEDIATE_TIMER_VALUE).build()),
-                willBe(nullValue())
+                manager.createZone(createZoneBuilder(ZONE_NAME + 
0).dataNodesAutoAdjust(IMMEDIATE_TIMER_VALUE).build()),
+                willThrowFast(CatalogValidationException.class, "Not 
compatible parameters")

Review Comment:
   Now I've adjusted the default values for zone creation, it's become:
   - `dataNodesAutoAdjust` == `INFINITE_TIMER_VALUE`
   - `dataNodesAutoAdjustScaleUp` == `IMMEDIATE_TIMER_VALUE`
   - `dataNodesAutoAdjustScaleDown` == `INFINITE_TIMER_VALUE`
   
   When we set `dataNodesAutoAdjust`, then `dataNodesAutoAdjustScaleUp` and 
`dataNodesAutoAdjustScaleDown` do not set and, accordingly, the fields will 
have the following values:
   - `dataNodesAutoAdjust` == `IMMEDIATE_TIMER_VALUE`
   - `dataNodesAutoAdjustScaleUp` == `IMMEDIATE_TIMER_VALUE`
   - `dataNodesAutoAdjustScaleDown` == `INFINITE_TIMER_VALUE`
   
   Which is not compatible.
   
   We can make it so that if we set the `dataNodesAutoAdjust` to any value 
other than `INFINITE_TIMER_VALUE`, then we will set 
`dataNodesAutoAdjustScaleUp` and  `dataNodesAutoAdjustScaleUDown` to 
`INFINITE_TIMER_VALUE`, which is not entirely obvious, wdyt ?



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