symious opened a new pull request, #12172:
URL: https://github.com/apache/ozone/pull/12172
## What changes were proposed in this pull request?
HDDS-17168 added gauges for the datanode gRPC read executor (active threads,
queue length). Those gauges don't show how long a request waits in the queue
before a thread picks it up, or how many requests are wasted on calls the
client has already given up on. This PR adds both to `XceiverServerGrpcMetrics`:
- `ReadExecutorQueueTimeNs`: XceiverServerGrpc now passes gRPC a wrapper
around the read executor that records the time from `execute()` until the task
starts running. Quantiles use `hdds.metrics.percentiles.intervals`, like
ContainerMetrics, so they are off by default. Domain socket reads share the
executor but are not wrapped; they already report `localInQueueLatencyNs<op>`.
- `SkippedCancelledRequests`: requests that the HDDS-17877 check skips
because their call was cancelled, or its deadline expired, while they were
queued.
- `DeadlineExceededCalls` / `CancelledCalls`: gRPC cancels the call
context when a call ends. It gives no cause on normal completion, a
`TimeoutException` when the deadline expires, and another cause when the client
cancels or the connection closes. A context listener registered in `send()`
counts the last two cases. `onError` is not used because it is not called once
the client has half-closed, and `setOnCancelHandler` would change how `onNext`
behaves after a cancel.
Together with ContainerMetrics `latencyNs<op>`, this splits datanode request
latency into queue wait and handler time.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17935
## How was this patch tested?
New unit tests:
- TestXceiverServerGrpcMetrics#recordsReadExecutorQueueTime
- TestGrpcXceiverService#countsCallsEndedByDeadlineOrCancellation
- TestGrpcXceiverService#cancelledCallIsNotDispatched now also checks
`SkippedCancelledRequests`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]