Mirza Aliev created IGNITE-19467: ------------------------------------ Summary: 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
*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 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)