sunm2n commented on PR #23962:
URL: https://github.com/apache/kafka/pull/23962#issuecomment-7128113336
Thanks, I'd split the answer by test.
I'd keep the partition-count test. I reproduced this case without topology
evolution in a local coordinator heartbeat test on a trunk-based branch. After
the sole source topic of a stateless subtopology was recreated with four
partitions instead of six, member 1 sent a heartbeat reporting tasks {0, 1, 2}.
The coordinator recomputed the task count as four and called
`StickyTaskAssignor` while member 2's stored assignment still contained {3, 4,
5}. The assignor returned {0, 1} for member 1 and {2, 3} for member 2, exactly
as the PR test expects.
For the removed-subtopology test, I couldn't find a current coordinator path
that produces this input. The coordinator rejects topology updates, and if it
observes that a source topic is missing, it marks the whole topology unready
and does not call the assignor. There is precedent for testing this input at
the assignor level: the randomized `BalancedTaskAssignorTest` includes both
claims on a removed subtopology and claims on out-of-range partitions
([existing
test](https://github.com/apache/kafka/blob/dbe3c9127fbc8e32425c5ea04d0af8b7656e77a7/group-coordinator/src/test/java/org/apache/kafka/coordinator/group/streams/assignor/BalancedTaskAssignorTest.java#L562-L580)).
I'd lean toward keeping the corresponding `StickyTaskAssignor` test because
it also checks that the surviving active and standby tasks keep their previous
owners. If you'd prefer to defer this case until topology updates are
supported, I'm happy to drop it and keep only the partition-count test.
--
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]