chickenchickenlove commented on PR #24250: URL: https://github.com/apache/kafka/pull/24250#issuecomment-6948569883
@lucasbru Thanks for taking the time to look into this deeply! > reconcile only the tasks whose source topics all have a known partition count, request a metadata update for the rest, and ack the partially resolved assignment (like AbstractMembershipManager does for the consumer) > skip nonexistent partitions, both in the assigned partitions and in the task inputs passed to the TaskManager > don't use a lower partition count than the one the task was reconciled with > resend the owned tasks in the heartbeat when the local epoch changes (see inline comment) > unit tests for these cases, and an integration test for the reproduction (a merge of a 1-partition and a 3-partition topic with the streams protocol), which the PR doesn't have yet > The callback failure handling (applied vs. reconciled assignment, revokedTasksSinceApply, late callbacks after fencing, FATAL on an inconsistent subscription state) overlaps with https://github.com/apache/kafka/pull/23773 / [KAFKA-21256](https://issues.apache.org/jira/browse/KAFKA-21256), so I'd keep it there. It's also what makes this hard to backport, since it builds on ApplyAssignmentEvent from [KAFKA-20106](https://issues.apache.org/jira/browse/KAFKA-20106), which 4.2 doesn't have. I'd also avoid StreamsApplyAssignmentEvent and the new onTasksAssigned parameter. The partition counts could be carried in StreamsRebalanceData.Assignment instead. Totally agreed. We discussed this yesterday in KAFKA-21188, and I'm currently preparing a new commit to reflect that discussion. (Do not consider callback failure and state) As you pointed out, the current PR has grown considerably because of the additional state needed to handle callbacks, and it also introduces quite a few interface changes. However, I'm now working on simplifying the implementation by leaving callback failure handling out of scope for this PR to minimize the changes. With this approach, I should be able to remove the AppliedAssignment and revokedTasksSinceApply fields. Removing these fields should reduce the changes needed in StreamsMembershipManager and eliminate the diffs in AsyncKafkaConsumer, ApplicationEventProcessor, and other related classes. As a result, I expect most of the changes to be concentrated in StreamsMembershipManager. I'll try to prepare the updated commit as soon as possible and ping you again once it's ready. I'll also make sure to address the review comments you've left above if they're still applicable after the changes. Thank you for your patience and for taking the time to review this PR! -- 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]
