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


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -1413,11 +1413,12 @@ private CompletableFuture<Void> 
handleChangePendingAssignmentEvent(
                     // Reset adds C into force pending and user writes data 
onto C.
                     // Then A and B go back online. In this case
                     // stable = [A, B, C], pending = [C, force] and only C 
should be started.
-                    if (isRecovery && 
!replicaMgr.isReplicaStarted(replicaGrpId)) {
+                    CompletableFuture<Replica> replicaFut = 
replicaMgr.replica(replicaGrpId);
+                    if (replicaFut == null || isRecovery && 
!isCompletedSuccessfully(replicaFut)) {

Review Comment:
   It's not equivalent. Within old version we've checked whether replicaFut != 
null only if isRecovery is true, within new version we will return immediately 
if replicaFut == null even if it's not recovery.



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