Description
Motivation:
It DistributionManager.start we have call of initDataNodesFromVaultManager, which contains the following code
zonesConfiguration.distributionZones().value().forEach(zone -> { int zoneId = zone.zoneId(); saveDataNodesAndUpdateTriggerKeysInMetaStorage( zoneId, appliedRevision, logicalTopology ); });
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:
change = zonesConfiguration.change(zonesChange -> zonesChange.changeDistributionZones(zonesListChange -> {
This code could be optimised and redundant {{zonesChange.changeDistributionZones(zonesListChange -> }} closure can be eliminated
Attachments
Issue Links
- is a child of
-
IGNITE-17924 Core distributions zones functionality.
- Open