Skip to content

Conversation

@eemario
Copy link
Contributor

@eemario eemario commented Dec 4, 2025

What is the purpose of the change

The goal of this pull request is to avoid reverse DNS lookups when TaskManager connects to BlobServer.

Brief change log

Use InetSocketAddress#getHostString instead of InetSocketAddress#getHostName to avoid reverse DNS lookups.

Verifying this change

This change is already covered by existing tests, such as BlobClientTest.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

@flinkbot
Copy link
Collaborator

flinkbot commented Dec 4, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

// InetSocketAddress can cache a failure in hostname resolution forever.
socket.connect(
new InetSocketAddress(serverAddress.getHostName(), serverAddress.getPort()),
new InetSocketAddress(serverAddress.getHostString(), serverAddress.getPort()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good. nit: I wonder if we could add a comment to explain why we do. not use getHostName. Maybe include some of the following reasons: Addresses are often configured as IP addresses for reliability
DNS may be unavailable or slow in containerized/cloud environments
Every blob transfer would trigger unnecessary reverse DNS lookups
Connection failures could occur if DNS resolution fails

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! I’ve updated the code comment to explain the reason.

@github-actions github-actions bot added the community-reviewed PR has been reviewed by the community. label Dec 4, 2025
@eemario
Copy link
Contributor Author

eemario commented Dec 9, 2025

@flinkbot run azure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants