lucasbru commented on code in PR #23454:
URL: https://github.com/apache/kafka/pull/23454#discussion_r4025013000
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/AssignmentRefinerImpl.java:
##########
@@ -288,6 +287,226 @@ private static boolean isReady(
.anyMatch(holder -> holder.processId().equals(targetProcessId) &&
holder.caughtUp());
}
+ /**
+ * Decides which of the staged migrations get a warm-up task, under the
warmup budget.
+ *
+ * <p>There is different scenarios:
+ * <ul>
+ * <li>A warm-up task already restoring keeps its warm-up slot if the
target assignment didn't change, and the
+ * warmu-up task is not caught up yet. It could also get revoked if
the warmup budget was reduced and keeping
+ * the warmup would now exceed the budget.
+ * <li>A <b>fresh plant</b> puts a warm-up task on a target owner
whose process holds nothing for the task,
+ * and spends a warm-up slot.</li>
+ * <li>When the target owner <em>itself</em> already holds a standby
of the task we can <b>borrow</b> it,
+ * and no warmup budget is used: that standby warms-up the task
anyway.</li>
+ * <li>If a target member's <em>sibling</em> hold a standby, we cannot
borrow but, but need to move the
+ * standby to its new owner, and putting a warmup on the target
member, spending a warm-up slot.
+ * (Cf case (2) of {@link #isReady(CurrentAssignmentIndex, TaskId,
String, String)} </li>
Review Comment:
cf case (2) of isReady - javadocs contradict, I suppose the code is doing
the right thing: We move the copy from the sibling to the target member.
--
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]