showuon opened a new pull request #9096:
URL: https://github.com/apache/kafka/pull/9096


   Recently, I tried to read the codes to understand what the 
`constrainedAssign` and `generalAssign` method is doing, but it is so difficult 
and suffering due to the complexity of the algorithm. And then I traced back to 
the JIRA ticket and KIP to get much more information about them. So, I think we 
should put the algorithm goal and main steps in the code comments, to let other 
developers better understand them and better do trouble shooting if any. 
   
   **reference for `constrainedAssign` algorithm:**
   
https://issues.apache.org/jira/browse/KAFKA-9987?focusedCommentId=17106832&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17106832
   
   **reference for `generalAssign` algorithm:**
   
https://cwiki.apache.org/confluence/display/KAFKA/KIP-54+-+Sticky+Partition+Assignment+Strategy
   
   
   ### 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to