MINOR: KIP-909 follow-ups (port validation, dead code, doc, test mock) - #23070
Merged
Conversation
chia7712
approved these changes
Aug 6, 2026
| @@ -114,12 +114,6 @@ public static List<InetSocketAddress> parseAddresses(List<String> urls, ClientDn | |||
| return addresses; | |||
Member
There was a problem hiding this comment.
The parseAddresses method is only used by NetworkClient, but NetworkClient is already too large to add more code to ...
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small review-follow-ups on top of the merged KIP-909 work (#21080,
#22897):
BootstrapConfiguration.enabled(...): wrap the host/port checkwith
try/catch IllegalArgumentExceptionso a malformed port (e.g.host:99999999999999999999that overflowsInteger.parseInt) surfacesas
ConfigException("Invalid port in ..."), matching the pre-existingbehaviour in
ClientUtils.parseAndValidateAddresses. Without this aNumberFormatExceptionwould leak out of client construction.ClientUtils.parseAndValidateAddresses(AbstractConfig): removed.This overload had no callers after the KIP-909 changes. The remaining
two overloads (
(List<String>, String)and(List<String>, ClientDnsLookup)) are still used byBrokerApiVersionsCommandandConnectionStressWorker, which constructNetworkClientdirectly withBootstrapConfiguration.DISABLEDand pre-resolved addresses.CommonClientConfigs.BOOTSTRAP_RESOLVE_TIMEOUT_MS_DOC: rewordedfrom "resolve for the bootstrap server address" to "resolve DNS for the
bootstrap server address" for clarity.
KafkaProducerTest: replacednew ConsumerGroupMetadata("test-group")withmock(ConsumerGroupMetadata.class)+when(...groupId()).thenReturn("test-group")— the constructor is@Deprecated(forRemoval).Reviewers: Chia-Ping Tsai chia7712@gmail.com