lucasbru commented on code in PR #23784:
URL: https://github.com/apache/kafka/pull/23784#discussion_r4249733955
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/AssignmentRefinerImpl.java:
##########
@@ -237,12 +238,19 @@ static Map<String, ProcessLoad> indexProcessLoad(
*
* <p>Only an active-running or caught-up copy is ever promoted.
*
+ * <p>A task whose target owner is {@link WarmupSupport#NOT_SUPPORTED} is
never staged: its target owner never
+ * reports its restore progress, so no warm-up task could ever be seen to
complete the migration.
+ *
* @param currentAssignment
* The indexed current assignment, from {@link
#indexCurrentAssignment}.
* @param targetAssignment
* All members' target assignments, as computed by the task
assignor.
* @param members
* All members of the group, used to resolve which process a member
runs in.
+ * @param warmupSupport
+ * Whether each member may be handed a warm-up task.
+ * @param heartbeatVersions
+ * The version of the latest heartbeat of each member, which tells
whether a member can be warmed up.
Review Comment:
Fixed in 4df855bc67. There was only one such tag in the file.
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/AssignmentRefinerImpl.java:
##########
@@ -302,6 +308,15 @@ static TaskDecisions analyzeTasks(
continue;
}
+ // A target owner that never reports its restore progress could
not be seen to finish warming up, so the
+ // task is handed to it right away, cold unless its own process
still holds the state. A caught-up copy on
+ // another process is not worth a detour either: promoting it
would only postpone the same grant and add
+ // a second hand-over. This is the price of a group that is
part-way through a client upgrade.
+ if (WarmupSupport.of(heartbeatVersions.get(targetOwner)) ==
WarmupSupport.NOT_SUPPORTED) {
Review Comment:
Unknown versions after a failover are handled in a follow-up PR of this
series. It won't grant directly, though: right after a failover every member is
unknown, so granting would turn every pending migration into a cold hand-over.
Instead, while any member is unknown, the refiner keeps migrations staged and
funds no new warm-up tasks until every member has heartbeated.
--
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]