rondagostino commented on PR #13116: URL: https://github.com/apache/kafka/pull/13116#issuecomment-1383262505
@cmccabe I updated this to deal with create topic requests that either set an explicit assignment or that use the default partition count. Note that this is logic that exists within `QuorumController`, and to take it into account with the throttling logic being invoked in Scala means we have to have it in `ControllerApis`. Also note that I didn't implement the full logic -- `QuorumController` has additional checks that could in fact cause a specific topic request to be rejected (e.g. explicit assignments not contiguous partition numbers starting with 0). This could lead to a calculation of partition counts for throttling purposes that exceeds the actual partition counts requested -- which could cause throttling in cases where technically it should not. I think this would be a rare occurrence -- so a small detriment to the Scala approach. The benefit of the Scala approach is that we avoid doing work in the controller itself when throttling does occur. We don't generate all of the Metadata Log records, for example. Note that createPartitions and delateTopics will have to get access to the partition counts, which currently I think is not available. -- 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