Skip to content

HDDS-17899. Replace getHostName with getHostString in short-circuit client cache key - #12135

Draft
ChenSammi wants to merge 2 commits into
apache:masterfrom
ChenSammi:HDDS-17899
Draft

ChenSammi wants to merge 2 commits into
apache:masterfrom
ChenSammi:HDDS-17899

Conversation

@ChenSammi

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  1. getHostName() call takes considerable time on Macbook, cause significant performance of the same vector search run.
  2. change frequent log from info to debug

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-17899

How was this patch tested?

Same benchmark

getHostName() run

Random access: 154 rows/sec
Vector search: 14.6 QPS
nprobes=  1  QPS=  14.6  avg_latency=68.3ms
nprobes=  4  QPS=  16.1  avg_latency=61.9ms
nprobes=  8  QPS=  16.3  avg_latency=61.4ms
nprobes= 16  QPS=  14.6  avg_latency=68.6ms
nprobes= 32  QPS=  15.4  avg_latency=65.1ms

getHostString() run

Random access: 1,009 rows/sec
Vector search: 73.8 QPS
nprobes=  1  QPS=  82.5  avg_latency=12.1ms
nprobes=  4  QPS=  88.8  avg_latency=11.3ms
nprobes=  8  QPS=  95.8  avg_latency=10.4ms
nprobes= 16  QPS=  90.2  avg_latency=11.1ms
nprobes= 32  QPS=  95.4  avg_latency=10.5ms

Copilot AI balanced review requested due to automatic review settings November 23, 2026 12:23
@ChenSammi
ChenSammi marked this pull request as draft November 23, 2026 12:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the short-circuit cache-key and logging changes.

No open issues 🎉

What changed in this PR

This PR reduces short-circuit read overhead in Ozone by avoiding reverse DNS lookups when constructing client cache keys and reducing routine connection logging.

Changes:

  • Replace getHostName() with getHostString() in short-circuit client cache keys.
  • Move routine connection and socket-closure logs from INFO to DEBUG.
  • Extract a command-independent request-key helper for response logging.
File Description
hadoop-hdds/​container-service/​src/​main/​java/​org/​apache/​hadoop/​ozone/​container/​keyvalue/​helpers/​BlockUtils.java Extracts a shared client-ID and call-ID request-key helper.
hadoop-hdds/​container-service/​src/​main/​java/​org/​apache/​hadoop/​ozone/​container/​common/​transport/​server/​XceiverServerDomainSocket.java Lowers routine peer logs to DEBUG and corrects the connection-counter spelling.
hadoop-hdds/​container-service/​src/​main/​java/​org/​apache/​hadoop/​ozone/​container/​common/​transport/​server/​Receiver.java Uses command-independent request keys in logs and lowers normal closure logging to DEBUG.
hadoop-hdds/​client/​src/​main/​java/​org/​apache/​hadoop/​hdds/​scm/​XceiverClientShortCircuit.java Moves expected response-task closure logging to DEBUG.
hadoop-hdds/​client/​src/​main/​java/​org/​apache/​hadoop/​hdds/​scm/​XceiverClientManager.java Avoids reverse DNS lookups when generating short-circuit cache keys.

Review effort: Balanced

@adoroszlai

Copy link
Copy Markdown
Contributor

@yandrey321 please take a look

@yandrey321

Copy link
Copy Markdown
Contributor

@ChenSammi how these numbers looks on x86 machine? M1 is not the target environment and network/memory performance differs from target x86 systems.

@fmorg-git

Copy link
Copy Markdown
Contributor

nit: I think you have the wrong Jira in the PR title HDDS-17800 vs HDDS-17899

@adoroszlai adoroszlai changed the title HDDS-17800. Replace getHostName with getHostString in short-circuit client cache key HDDS-17899. Replace getHostName with getHostString in short-circuit client cache key Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants