sanpwc commented on code in PR #2172:
URL: https://github.com/apache/ignite-3/pull/2172#discussion_r1229162592


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -1027,44 +1030,52 @@ private void initDataNodesFromVaultManager() {
         try {
             long appliedRevision = metaStorageManager.appliedRevision();
 
-            VaultEntry topologyEntry = 
vaultMgr.get(zonesLogicalTopologyKey()).join();
-
-            if (topologyEntry != null && topologyEntry.value() != null) {
-                assert  appliedRevision > 0 : "The meta storage last applied 
revision is 0 but the logical topology is not null.";
-
-                logicalTopology = fromBytes(topologyEntry.value());
-
-                logicalTopology.forEach(n -> nodesAttributes.put(n.nodeId(), 
n.nodeAttributes()));
+            restoreGlobalStateFromVault();

Review Comment:
   It seems a little bit messy now. 
   In start() we have
   ```
               initDataNodesFromVaultManager();
   
               initLogicalTopologyAndVersionInMetaStorageOnStart();
   ```
   where `initDataNodesFromVaultManager` restores logicalTopology despite the 
fact that according to the method names it's the 
`initLogicalTopologyAndVersionInMetaStorageOnStart` to do this.
   So, please refactor this a bit, at lease by adjusting method names.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to