You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "tkalkirill (via GitHub)" <gi...@apache.org> on 2023/08/18 09:33:54 UTC
[GitHub] [ignite-3] tkalkirill opened a new pull request, #2462: IGNITE-20248 Fix validation of autoAdjust, scaleUp and scaleDown when creating a zone in the catalog
tkalkirill opened a new pull request, #2462:
URL: https://github.com/apache/ignite-3/pull/2462
https://issues.apache.org/jira/browse/IGNITE-20248
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
### The Review Checklist
- [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:
\- There is a single JIRA ticket related to the pull request.
\- The web-link to the pull request is attached to the JIRA ticket.
\- The JIRA ticket has the Patch Available state.
\- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
\- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
- [ ] **Design:** new code conforms with the design principles of the components it is added to.
- [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
- [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
- [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
### Notes
- [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] tkalkirill merged pull request #2462: IGNITE-20248 Fix validation of autoAdjust, scaleUp and scaleDown when creating a zone in the catalog
Posted by "tkalkirill (via GitHub)" <gi...@apache.org>.
tkalkirill merged PR #2462:
URL: https://github.com/apache/ignite-3/pull/2462
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] tkalkirill commented on a diff in pull request #2462: IGNITE-20248 Fix validation of autoAdjust, scaleUp and scaleDown when creating a zone in the catalog
Posted by "tkalkirill (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] tkalkirill commented on a diff in pull request #2462: IGNITE-20248 Fix validation of autoAdjust, scaleUp and scaleDown when creating a zone in the catalog
Posted by "tkalkirill (via GitHub)" <gi...@apache.org>.
tkalkirill commented on code in PR #2462:
URL: https://github.com/apache/ignite-3/pull/2462#discussion_r1301198265
##########
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:
Fix it
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] alievmirza commented on a diff in pull request #2462: IGNITE-20248 Fix validation of autoAdjust, scaleUp and scaleDown when creating a zone in the catalog
Posted by "alievmirza (via GitHub)" <gi...@apache.org>.
alievmirza commented on code in PR #2462:
URL: https://github.com/apache/ignite-3/pull/2462#discussion_r1299718917
##########
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:
Why do we have "Not compatible parameters" when try to set `IMMEDIATE_TIMER_VALUE` to `dataNodesAutoAdjust`
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] alievmirza commented on a diff in pull request #2462: IGNITE-20248 Fix validation of autoAdjust, scaleUp and scaleDown when creating a zone in the catalog
Posted by "alievmirza (via GitHub)" <gi...@apache.org>.
alievmirza commented on code in PR #2462:
URL: https://github.com/apache/ignite-3/pull/2462#discussion_r1299902491
##########
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:
I would prefer to save previous behaviour, and as far as I know, we already have such logic, please check `org.apache.ignite.internal.distributionzones.DistributionZoneManager#updateZoneChange`
##########
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:
I would prefer to save the previous behaviour, and as far as I know, we already have such logic, please check `org.apache.ignite.internal.distributionzones.DistributionZoneManager#updateZoneChange`
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org