You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/12/08 23:08:10 UTC
[GitHub] [kafka] cmccabe commented on pull request #12965: KAFKA-14448 Let ZK brokers register with KRaft controller
cmccabe commented on PR #12965:
URL: https://github.com/apache/kafka/pull/12965#issuecomment-1343489745
Thanks for the PR!
> This patch uses the new isMigratingZkBroker field in BrokerRegistrationRequest and RegisterBrokerRecord. The type was changed from int8 to bool for BrokerRegistrationRequest (a mistake from https://github.com/apache/kafka/pull/12860).
I think there is one other major mistake we made there: this should not be a tagged field, but should be a new version of the RPC. The reason is because this is not safe to ignore. If an old controller treats this broker like an ordinary KRaft broker, that would be a big mistake.
While a new verison of `BrokerRegistrationRequest` may seem difficult to implement, I think it's actually simpler than it seems. The `NetworkClient` itself should have the `ApiVersions` of the controller available. It gets this when it first connects to the controller. So we can simply take the max of the registration version our broker supports, and the registration version the controller supports.
There is already code to do all this in `BrokerRegistrationRequest#Builder`. The only complication is if you need to set `isZkBroker` you need to set `BrokerRegistrationRequest#Builder.oldestAllowedVersion` to 1 rather than 0.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org