IGNITE-18540 Fixed processing of the default distribution zone.#1532
Merged
sanpwc merged 3 commits intoapache:mainfrom Jan 18, 2023
Merged
IGNITE-18540 Fixed processing of the default distribution zone.#1532sanpwc merged 3 commits intoapache:mainfrom
sanpwc merged 3 commits intoapache:mainfrom
Conversation
2e8cb9d to
cb5962a
Compare
cb5962a to
d72a3c2
Compare
sanpwc
requested changes
Jan 17, 2023
| logicalTopology = newLogicalTopology; | ||
|
|
||
| zonesConfiguration.distributionZones().value().namedListKeys() | ||
| Stream.of( |
Contributor
There was a problem hiding this comment.
I'd rather encapsulate all actions to be performed with zone into some fooBar method and simply call fooBar for defaultZone and fooBar for all other zones from the list.
Contributor
Author
There was a problem hiding this comment.
Fixed, thanks.
alievmirza
reviewed
Jan 17, 2023
| throw new DistributionZoneRenameException(name, distributionZoneCfg.name(), e); | ||
| } | ||
| if (DEFAULT_ZONE_NAME.equals(name)) { | ||
| change = zonesConfiguration.change(zonesChange -> zonesChange |
Contributor
There was a problem hiding this comment.
I would use formatting like this
change = zonesConfiguration.change(
zonesChange -> zonesChange.changeDefaultDistributionZone(
zoneChange -> updateZoneChange(zoneChange, distributionZoneCfg)
)
);
Contributor
Author
There was a problem hiding this comment.
Fixed, thanks.
| * @param zoneChange Zone change. | ||
| * @param distributionZoneCfg Distribution zone configuration. | ||
| */ | ||
| private void updateZoneChange(DistributionZoneChange zoneChange, DistributionZoneConfigurationParameters distributionZoneCfg) { |
| assertEquals(Integer.MAX_VALUE, zone1.dataNodesAutoAdjustScaleUp().value(), "dataNodesAutoAdjustScaleUp is wrong."); | ||
| assertEquals(Integer.MAX_VALUE, zone1.dataNodesAutoAdjustScaleDown().value(), "dataNodesAutoAdjustScaleDown is wrong."); | ||
| assertEquals(100, zone1.dataNodesAutoAdjust().value(), "dataNodesAutoAdjust is wrong."); | ||
| public void testUpdateZone(String zoneName) throws Exception { |
Contributor
There was a problem hiding this comment.
Suggested change
| public void testUpdateZone(String zoneName) throws Exception { | |
| private void testUpdateZone(String zoneName) throws Exception { |
sanpwc
approved these changes
Jan 18, 2023
lowka
pushed a commit
to gridgain/apache-ignite-3
that referenced
this pull request
Mar 18, 2023
lowka
pushed a commit
to gridgain/apache-ignite-3
that referenced
this pull request
Apr 19, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/IGNITE-18540