rpuch commented on code in PR #5598:
URL: https://github.com/apache/ignite-3/pull/5598#discussion_r2039705748


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -1542,6 +1558,42 @@ public void 
unloadTableResourcesFromZoneReplica(ZonePartitionId zonePartitionId,
         zoneResourcesManager.removeTableResources(zonePartitionId, tableId);
     }
 
+    /**
+     * Restarts the zone's partition including the replica and raft node.
+     *
+     * @param zonePartitionId Zone's partition that needs to be restarted.
+     * @param revision Metastore revision.
+     * @return Operation future.
+     */
+    public CompletableFuture<?> restartPartition(ZonePartitionId 
zonePartitionId, long revision, long assignmentsTimestamp) {
+        return inBusyLockAsync(busyLock, () -> 
stopPartitionForRestart(zonePartitionId, revision).thenComposeAsync(unused -> {
+            Assignments stableAssignments = 
zoneStableAssignmentsGetLocally(metaStorageMgr, zonePartitionId, revision);
+
+            assert stableAssignments != null : "zonePartitionId=" + 
zonePartitionId + ", revision=" + revision;
+
+            return 
waitForMetadataCompleteness(assignmentsTimestamp).thenCompose(unused2 -> 
inBusyLockAsync(busyLock, () -> {
+                Assignment localMemberAssignment = 
localMemberAssignment(stableAssignments);
+
+                if (localMemberAssignment == null) {
+                    // (0) in case if node not in the assignments

Review Comment:
   Is it an established terminology? I had a suspicion, but it is still not 
that obvious



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