Skip to content

Fix server host resolution when host is configured#18625

Open
wolfkill wants to merge 1 commit into
apache:masterfrom
wolfkill:fix/server-host-lazy-resolution
Open

Fix server host resolution when host is configured#18625
wolfkill wants to merge 1 commit into
apache:masterfrom
wolfkill:fix/server-host-lazy-resolution

Conversation

@wolfkill
Copy link
Copy Markdown
Contributor

Fixes #17152

Summary

  • resolve the server hostname lazily so an explicit pinot.server.netty.host does not evaluate NetUtils.getHostAddress() or NetUtils.getHostnameOrAddress()
  • preserve the existing fallback behavior when the host is not configured
  • add focused coverage for configured host, address fallback, and hostname fallback

Testing

  • JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home ./mvnw -pl pinot-server -am -Dtest=BaseServerStarterTest -Dsurefire.failIfNoSpecifiedTests=false test
  • git diff --check

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 29, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 64.41%. Comparing base (6bff229) to head (1f764e1).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
.../pinot/server/starter/helix/BaseServerStarter.java 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18625      +/-   ##
============================================
+ Coverage     64.39%   64.41%   +0.01%     
  Complexity     1137     1137              
============================================
  Files          3336     3337       +1     
  Lines        206096   206070      -26     
  Branches      32145    32128      -17     
============================================
+ Hits         132721   132736      +15     
+ Misses        62714    62700      -14     
+ Partials      10661    10634      -27     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.41% <83.33%> (+0.01%) ⬆️
temurin 64.41% <83.33%> (+0.01%) ⬆️
unittests 64.41% <83.33%> (+0.01%) ⬆️
unittests1 56.82% <ø> (+0.03%) ⬆️
unittests2 36.95% <83.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wolfkill wolfkill marked this pull request as ready for review May 29, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pinot Server fails to start in offline/air-gapped environments due to eager evaluation of NetUtils.getHostAddress()

2 participants