chickenchickenlove opened a new pull request, #23595:
URL: https://github.com/apache/kafka/pull/23595

   ### Background
   
   Custom Streams task assignors can represent a subtopology with no assigned 
tasks either by omitting its entry or by returning an empty task set. The 
coordinator preserves empty entries in the target assignment, while 
reconciliation omits them from the current assignment. Previously, 
`TasksTuple.sameTasks()` treated these representations as different, causing an 
otherwise stable group to advance its epochs and write assignment update 
records on every heartbeat.
   
   Update `sameTasks()` to treat absent subtopologies as empty task sets for 
active, standby, and warm-up assignments. Compare both directions to detect 
tasks present on only one side, and continue ignoring active-task assignment 
epochs. This also handles empty entries restored from existing target 
assignment records.
   
   Add regression tests for empty entries on either side, mixed empty and 
non-empty entries, actual task differences, and targets restored from records. 
A coordinator test replays a target containing empty entries and verifies that 
a heartbeat preserves the group, assignment, and member epochs and produces no 
additional records.
   
   ### Alternative considered
   
   Normalize empty task sets in the assignor output by removing empty 
subtopology entries. However, this would not address empty entries restored 
from existing target assignment records. Updating `sameTasks()` handles both 
new assignments and previously persisted targets without changing the stored 
representation.


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

Reply via email to