Repository navigation
KAFKA-20734: Return noNode for known partitions without endpoints - #22680
xiaoqingwanga wants to merge 3 commits into
Conversation
|
A label of 'needs-attention' was automatically added to this PR in order to raise the |
|
A label of 'needs-attention' was automatically added to this PR in order to raise the |
kevin-wu24
left a comment
There was a problem hiding this comment.
Thanks for the fix @xiaoqingwanga. I left some comments on the test.
| new RegisterBrokerRecord() | ||
| .setBrokerId(0) | ||
| .setBrokerEpoch(BROKER_EPOCH) | ||
| .setFenced(false) | ||
| .setEndPoints(new BrokerEndpointCollection(List.of( |
There was a problem hiding this comment.
I think we need to also add .setRack(null) to make this test pass. Otherwise the first assertion fails.
| .flatMap(broker -> broker.node(listenerName.value())) | ||
| .orElse(Node.noNode())); |
There was a problem hiding this comment.
nit: remove extra indentation.
Generated-by: OpenAI Codex
… coverage for transaction markers
|
Hi, the comments are resolved. Please review again @kevin-wu24 |
In
KRaftMetadataCache,getPartitionLeaderEndpointreturns empty when the previous leader is offline after the refactor.With this PR, the method now returns
noNodewhen the leader partition exists, aligning with the original Scala implementation.Changes are covered by unit tests. Please feel free to review.
Reviewers: Kevin Wu kwu@confluent.io