cmccabe commented on code in PR #17128:
URL: https://github.com/apache/kafka/pull/17128#discussion_r1750743769
##########
clients/src/main/java/org/apache/kafka/common/requests/BrokerRegistrationRequest.java:
##########
@@ -46,21 +46,7 @@ public short oldestAllowedVersion() {
@Override
public BrokerRegistrationRequest build(short version) {
- if (version < 4) {
- // Workaround for KAFKA-17011: for BrokerRegistrationRequest
versions older than 4,
- // translate minSupportedVersion = 0 to minSupportedVersion =
1.
- BrokerRegistrationRequestData newData = data.duplicate();
- for (Iterator<BrokerRegistrationRequestData.Feature> iter =
newData.features().iterator();
- iter.hasNext(); ) {
- BrokerRegistrationRequestData.Feature feature =
iter.next();
- if (feature.minSupportedVersion() == 0) {
- feature.setMinSupportedVersion((short) 1);
- }
- }
- return new BrokerRegistrationRequest(newData, version);
- } else {
- return new BrokerRegistrationRequest(data, version);
- }
+ return new BrokerRegistrationRequest(data, version);
Review Comment:
Sorry, I don't understand the change here. The correct change (that matches
the PR description) would be to remove features that had a minVersion of 0 when
handling older RPCs, right? But instead the code just seems to pass everything
through, ignoring RPC version. What am I missing?
--
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]