sanghyeok An created KAFKA-21167:
------------------------------------
Summary: StickyTaskAssignor can overlook local state when a member
reaches quota
Key: KAFKA-21167
URL: https://issues.apache.org/jira/browse/KAFKA-21167
Project: Kafka
Issue Type: Bug
Reporter: sanghyeok An
Assignee: sanghyeok An
The broker-side StickyTaskAssignor selects a previous-state candidate before
checking its quota. A member at quota can prevent another eligible member in
the same process from being selected, causing unnecessary state restoration.
There are three stateful tasks and five members, giving an active task quota of
one per member: * Process P has two members: p1 previously owned task 0, and p2
had no active tasks. Both report local state for task 2.
* Process Q has three members: q1 previously owned task 1, while q2 and q3 had
no active tasks. None report local state for task 2.
After tasks 0 and 1 are retained, p1 is at quota while p2 remains available. If
p1 is considered first, p2 cannot replace it because both members have the same
process load. The subsequent quota check rejects p1 without trying p2.
Task 2 then falls back to load-based assignment, which selects Q because its
load is 1/3, compared with P's 1/2 even if p2 has local state for task 2.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)