suzhiking commented on code in PR #24309:
URL: https://github.com/apache/kafka/pull/24309#discussion_r4670665302
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/AssignmentRefinerImpl.java:
##########
@@ -330,10 +331,13 @@ static TaskDecisions analyzeTasks(
// member reconciles to. Tasks that no member holds as an active
task are placed below as usual.
if (holder != null && keepActiveTasks) {
// A process can't hold a warm-up task next to the active
task, so a move within it can't be warmed up.
+ // A target owner that never reports its restore progress
could not be seen to finish warming up.
final boolean sameProcess =
members.get(holder.memberId()).processId().equals(targetProcessId);
+ final boolean warmable = !sameProcess
Review Comment:
From `warmingOf`:
```
if (migration.targetProcessId().isEmpty()) {
// The target assignment names a member the group no longer has,
so there is nowhere to warm up and no
// warm-up slot may be spent. The task simply stays with its
current owner.
return Warming.PARK;
}
```
Warming.PARK is used for migration where target member does not exist. Since
we changed the semantics of empty `targetProcessId`, now if a migration is
borrowed migration where target member heartbeat version is 0, it will instead
get identified as parked migration, and thus `assemble` will no longer add back
standby the target member already held, so this target member would lose a
standby copy. I think we might need a way to differentiate invalid target
member and invalid heartbeat version case.
--
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]