guozhangwang opened a new pull request, #12439: URL: https://github.com/apache/kafka/pull/12439
1. Consolidate the task recycle procedure into a single function within the task. The current procedure now becomes: a) task.recycleStateAndConvert, at end of it the task is in `closed` while its stateManager is retained, and the manager type has been converted; 2) create the new task with old task's fields and the stateManager inside the creators. 2. Move the task execution related metadata into the corresponding `TaskExecutionMetadata` class, including the task idle related metadata (e.g. successfully processed tasks); reduce the number of params needed for `TaskExecutor` as well as `Tasks`. 3. Move the task execution related fields (embedded producer and consumer) and task creators out of `Tasks` and migrated into `TaskManager`. Now the `Tasks` is only a bookkeeping place without any task mutation logic. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org