Skip to content

KAFKA-20855: Extract bootstrap resolution from NetworkClient - #23066

Open
lh0156 wants to merge 4 commits into
apache:trunkfrom
lh0156:agent/KAFKA-20855-network-client-refactor
Open

KAFKA-20855: Extract bootstrap resolution from NetworkClient#23066
lh0156 wants to merge 4 commits into
apache:trunkfrom
lh0156:agent/KAFKA-20855-network-client-refactor

Conversation

@lh0156

@lh0156 lh0156 commented Aug 3, 2026

Copy link
Copy Markdown

Summary

KIP-909 added asynchronous bootstrap DNS resolution state to NetworkClient. This change extracts that state machine into the package-private BootstrapServerResolver so NetworkClient remains focused on network I/O and metadata coordination.

The behavior is unchanged: resolution starts eagerly, the timeout starts on the first poll, completed results are processed before the deadline check, failed or empty resolutions retry with the configured backoff, and close/interrupt paths cancel outstanding work. There are no public API, configuration, protocol, or wire-format changes.

Test Strategy

The resolver tests define the lifecycle contract for successful resolution, empty-result retry, exceptional-result retry, and timeout failure before the implementation is integrated. Existing NetworkClientTest bootstrap and networking coverage remains green.

Verified with:

  • ./gradlew :clients:test --tests org.apache.kafka.clients.BootstrapServerResolverTest --tests org.apache.kafka.clients.NetworkClientTest
  • ./gradlew :clients:spotlessCheck :clients:checkstyleMain :clients:checkstyleTest :clients:spotbugsMain

Generated-by: OpenAI Codex (GPT-5)

Signed-off-by: Yunseop Eom <62834176+lh0156@users.noreply.github.com>
@github-actions github-actions Bot added triage PRs from the community clients labels Aug 3, 2026
lh0156 added 3 commits August 3, 2026 16:23
Generated-by: OpenAI Codex (GPT-5)

Signed-off-by: Yunseop Eom <62834176+lh0156@users.noreply.github.com>
Generated-by: OpenAI Codex (GPT-5)

Signed-off-by: Yunseop Eom <62834176+lh0156@users.noreply.github.com>
Verify that disabling bootstrap resolution neither starts DNS work nor reports metadata changes. Keep the lifecycle contract explicit while extracting bootstrap resolution from NetworkClient.

Generated-by: OpenAI Codex (GPT-5)

Signed-off-by: Yunseop Eom <62834176+lh0156@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant