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


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -1205,36 +1205,41 @@ private CompletableFuture<Void> 
weakStopPartition(ZonePartitionId zonePartitionI
         return replicaMgr.weakStopReplica(
                 zonePartitionId,
                 WeakReplicaStopReason.EXCLUDED_FROM_ASSIGNMENTS,
-                () -> stopPartition(zonePartitionId, revision)
+                () -> 
stopPartition(zonePartitionId).thenCompose(replicaWasStopped -> {
+                    if (!replicaWasStopped) {
+                        return nullCompletedFuture();
+                    }
+

Review Comment:
   This method (`weakStopPartition()`) name doesn't seem to be the best one. It 
says something about 'weak', but it doesn't say that it is going to destroy the 
partition in the end. It only gets called from a method which does mention 
destruction. How about just inlining this `weakStopPartition()`?



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