kgusakov commented on code in PR #2852:
URL: https://github.com/apache/ignite-3/pull/2852#discussion_r1405470967


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -676,31 +679,28 @@ private void 
updateLogicalTopologyInMetaStorage(LogicalTopologySnapshot newTopol
 
     /**
      * Restores from local Meta Storage logical topology and nodes' attributes 
fields in {@link DistributionZoneManager} after restart.
+     *
+     * @param recoveryRevision Revision of the Meta Storage after its recovery.
      */
-    private void restoreGlobalStateFromLocalMetastorage(long revision) {
-        Entry topologyEntry = 
metaStorageManager.getLocally(zonesLogicalTopologyKey(), revision);
+    private void restoreGlobalStateFromLocalMetastorage(long recoveryRevision) 
{
+        Entry topologyEntry = 
metaStorageManager.getLocally(zonesLastHandledTopology(), recoveryRevision);

Review Comment:
   Could you rename the variable also? `lastHandledTopologyEntry`



##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java:
##########
@@ -84,6 +84,9 @@ public class DistributionZonesUtil {
     /** Key value for zones' global state revision. */
     private static final String DISTRIBUTION_ZONES_GLOBAL_STATE_REVISION = 
"distributionZones.globalState.revision";
 
+    /** Key value for the last handled logical topology by Distribution zone 
manager. */
+    private static final String DISTRIBUTION_ZONES_LAST_HANDLED_TOPOLOGY = 
"distributionZones.globalState.lastHandledTopology";

Review Comment:
   Minor, but: there is some naming inconsistency, this prefix also has the 
`.globalState.` as previous, but the name is 
`DISTRIBUTION_ZONES_LAST_HANDLED_TOPOLOGY` instead of 
`DISTRIBUTION_ZONES_GLOBAL_STATE_LAST_HANDLED_TOPOLOGY`.
   
   Maybe we can use a shorter _GLOBAL_ and kill two birds with one stone: have 
consistent, but not too long naming.
   
   Anyway, up to you, not a big deal.



-- 
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