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/07 22:54:09 UTC
[GitHub] [kafka] cmccabe commented on a diff in pull request #12961: KAFKA-14446: API forwarding support from zkBrokers to the Controller
cmccabe commented on code in PR #12961:
URL: https://github.com/apache/kafka/pull/12961#discussion_r1042759981
##########
clients/src/main/java/org/apache/kafka/common/requests/LeaderAndIsrRequest.java:
##########
@@ -66,10 +75,14 @@ public LeaderAndIsrRequest build(short version) {
).collect(Collectors.toList());
LeaderAndIsrRequestData data = new LeaderAndIsrRequestData()
- .setControllerId(controllerId)
.setControllerEpoch(controllerEpoch)
.setBrokerEpoch(brokerEpoch)
.setLiveLeaders(leaders);
+ if (kraftController) {
+ data.setKRaftControllerId(controllerId).setControllerId(-1);
Review Comment:
Maybe this is just me, but this if block seems confusing
can we do something like
```
.setControllerId(kraftController ? -1 : controllerId)
.setKRaftControllerId(kraftController ? controllerId : -1)
```
--
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