ahuang98 commented on code in PR #16848:
URL: https://github.com/apache/kafka/pull/16848#discussion_r1716276594
##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -409,6 +410,15 @@ public ControllerResult<BrokerRegistrationReply>
registerBroker(
for (BrokerRegistrationRequestData.Feature feature :
request.features()) {
record.features().add(processRegistrationFeature(brokerId,
finalizedFeatures, feature));
}
+ if (request.features().find(KRaftVersion.FEATURE_NAME) == null) {
Review Comment:
> We should just leave the kraft.version out of the RPCs and records if it
is 0.
Agree with this statement you made offline, I'm taking this github comment
to mean let's not bother adding kraft.version in the record if it's 0, but
let's keep the kraft.version check (e.g. to catch the case we have a kraft
controller with finalized version 1, and a broker registration request comes in
w/o kraft.version in its supported features. We can only assume the broker is
on kraft.version 0 and should reject the request.)
##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -409,6 +410,15 @@ public ControllerResult<BrokerRegistrationReply>
registerBroker(
for (BrokerRegistrationRequestData.Feature feature :
request.features()) {
record.features().add(processRegistrationFeature(brokerId,
finalizedFeatures, feature));
}
+ if (request.features().find(KRaftVersion.FEATURE_NAME) == null) {
Review Comment:
> We should just leave the kraft.version out of the RPCs and records if it
is 0.
Agree with this statement you made offline, I'm taking this github comment
to mean let's not bother adding kraft.version in the record if it's 0, but
let's keep the kraft.version check (e.g. to catch the case we have a kraft
controller with finalized version 1, and a broker registration request comes in
w/o kraft.version in its supported features. We can only assume the broker is
on kraft.version 0 and should reject the request.)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]