[ https://issues.apache.org/jira/browse/IGNITE-19467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17738042#comment-17738042 ]
Mirza Aliev commented on IGNITE-19467: -------------------------------------- The first part of this ticket has already been fixed in https://issues.apache.org/jira/browse/IGNITE-19580, the second part it is useless to do because we plan to get rid of the configuration interaction with zones and move it to catalog https://issues.apache.org/jira/browse/IGNITE-19502, so I close this ticket > Remove redundant zones' iteration on DistributionManager.start and optimize > usage of cfg.change in the DistributionManager > ---------------------------------------------------------------------------------------------------------------------------- > > Key: IGNITE-19467 > URL: https://issues.apache.org/jira/browse/IGNITE-19467 > Project: Ignite > Issue Type: Bug > Reporter: Mirza Aliev > Priority: Major > Labels: ignite-3, tech-debt > > *Motivation:* > It DistributionManager.start we have call of initDataNodesFromVaultManager, > which contains the following code > {noformat} > zonesConfiguration.distributionZones().value().forEach(zone > -> { > int zoneId = zone.zoneId(); > saveDataNodesAndUpdateTriggerKeysInMetaStorage( > zoneId, > appliedRevision, > logicalTopology > ); > }); > {noformat} > This logic is redundant, because we have the same logic on a zone creation > ({{DistributionZoneManager.ZonesConfigurationListener#onCreate}}), and when > node is restarted, all configuration changes are applied again, meaning that > {{DistributionZoneManager.ZonesConfigurationListener#onCreate}} will be > called. Also we can review the possibility to remove the same code for a > default zone, but instead of the named list scenario with the user's zones, > {{onCreate}} for the default zone is not triggered after restart. > Also there are several places in the code, which we use such constructions: > {noformat} > change = zonesConfiguration.change(zonesChange -> > zonesChange.changeDistributionZones(zonesListChange -> { > {noformat} > This code could be optimised and redundant > {{zonesChange.changeDistributionZones(zonesListChange -> }} closure can be > eliminated -- This message was sent by Atlassian Jira (v8.20.10#820010)