JAkutenshi commented on code in PR #5173:
URL: https://github.com/apache/ignite-3/pull/5173#discussion_r1943047302
##########
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:
The method is renamed, but inline is a bit excessive there: the logic will
be reused in the future for other replica stopping scenarios (you may take a
look as an example as it implemented in `TableManager`)
--
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]