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

   The original state updater code path put tasks into an "initialization 
queue", with created, but not initialized tasks. These are later, during the 
event-loop, initialized and added to the state updater.
   
   I can't see a reason why this is necessary - we can initialize the task 
immediately. This avoids a losing track of those task - in particular in the 
old code path it was possible to create tasks twice, if we do not go once 
around `runLoop` to initialize the task. This would lead to 
`IllegalStateExceptions`. By handing the task to the state updater immediately, 
we can fulfil our promise to preserve the invariant "every task is owned by 
either the task registry or the state updater".
   
   For testing, I adapted the existing unit tests. I will add an integration 
test once this code path is stable
   
   ### Committer Checklist (excluded from commit message)
   - [x] Verify design and implementation 
   - [x] Verify test coverage and CI build status
   - [x] 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

Reply via email to