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


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -203,22 +225,115 @@ public CompletableFuture<Void> 
startAsync(ComponentContext componentContext) {
                         inBusyLock(busyLock, () -> 
onCreateZone(parameters).thenApply((ignored) -> false))
         );
 
-        return nullCompletedFuture();
+        return allOf(processZonesOnStart, processAssignmentsFuture);
+    }
+
+    private CompletableFuture<Void> processZonesOnStart(long recoveryRevision, 
@Nullable HybridTimestamp lwm) {
+        int earliestCatalogVersion = 
catalogMgr.activeCatalogVersion(hybridTimestampToLong(lwm));
+        int latestCatalogVersion = catalogMgr.latestCatalogVersion();
+
+        var startedZones = new IntOpenHashSet();
+        var startZoneFutures = new ArrayList<CompletableFuture<?>>();
+
+        for (int ver = latestCatalogVersion; ver >= earliestCatalogVersion; 
ver--) {
+            int ver0 = ver;
+            catalogMgr.zones(ver).stream()
+                    .filter(tbl -> startedZones.add(tbl.id()))

Review Comment:
   Renames to zone



##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -203,22 +225,115 @@ public CompletableFuture<Void> 
startAsync(ComponentContext componentContext) {
                         inBusyLock(busyLock, () -> 
onCreateZone(parameters).thenApply((ignored) -> false))
         );
 
-        return nullCompletedFuture();
+        return allOf(processZonesOnStart, processAssignmentsFuture);
+    }
+
+    private CompletableFuture<Void> processZonesOnStart(long recoveryRevision, 
@Nullable HybridTimestamp lwm) {
+        int earliestCatalogVersion = 
catalogMgr.activeCatalogVersion(hybridTimestampToLong(lwm));
+        int latestCatalogVersion = catalogMgr.latestCatalogVersion();
+
+        var startedZones = new IntOpenHashSet();
+        var startZoneFutures = new ArrayList<CompletableFuture<?>>();
+
+        for (int ver = latestCatalogVersion; ver >= earliestCatalogVersion; 
ver--) {
+            int ver0 = ver;
+            catalogMgr.zones(ver).stream()
+                    .filter(tbl -> startedZones.add(tbl.id()))

Review Comment:
   Renamed to zone



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to