vadimkolodingg commented on code in PR #5825:
URL: https://github.com/apache/ignite-3/pull/5825#discussion_r2097775498


##########
modules/partition-distribution/src/main/java/org/apache/ignite/internal/partitiondistribution/PendingAssignmentsCalculator.java:
##########
@@ -49,15 +53,79 @@ public PendingAssignmentsCalculator target(Assignments 
target) {
     }
 
     /**
-     * Calculates the pending assignments queue between current stable and 
target assignments.
+     * Calculates the pending assignments queue between current stable (not 
included) and target assignments (included, last element).
      */
     public AssignmentsQueue toQueue() {
         assert stable != null;
         assert target != null;
 
-        // naive version with only one configuration switch, calculation will 
be changed during IGNITE-23790 epic
-        AssignmentsQueue queue = new AssignmentsQueue(target);
-        assert Objects.equals(queue.peekLast(), target) : "Target assignments 
should be equal to the last element in the queue";
+        if (target.force()) {
+            return new AssignmentsQueue(target);
+        }

Review Comment:
   forcing assignments is part of recovery process where all stable can be 
dead, so there is no possible transition - need to start new raft group from 
scratch



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