[
https://issues.apache.org/jira/browse/HDDS-16720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126209#comment-18126209
]
Gargi Jaiswal commented on HDDS-16720:
--------------------------------------
@Elavarasan Kathirvel , the reason that both {{numLocalGetBlock}} and
{{numGetBlock}} are increased is the short-circuit read calls the general
{{HddsDispatcher}} which increase the {{num$Operation}} automatically. This
cannot not changed. So based on this, we need to change the server side metrics
relationship to following:
after a successful get block request
# both {{numLocalGetBlock}} and {{numGetBlock}} will be increased by 1
# both bytesGetBlock and localBytesGetBlock should be increased by N
# short circuit metrics localLatency >= general get block latency
So overall, the general metrics includes both calls from GRPC and
Short-circuit, and the metrics with “local” key words, only includes read from
short-circuit.
Current implementation, both (1) and (3) are there, but (2) is not.
I will use this ticket to fix (2).
> Short-circuit GetBlock ops are counted in both numGetBlock and
> numLocalGetBlock
> -------------------------------------------------------------------------------
>
> Key: HDDS-16720
> URL: https://issues.apache.org/jira/browse/HDDS-16720
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Datanode
> Reporter: Elavarasan Kathirvel
> Assignee: Gargi Jaiswal
> Priority: Minor
> Labels: short-circuit-read
>
> When Short-Circuit Read (SCR) is enabled and a co-located client reads a key
> via the domain-socket path, {{numLocalGetBlock}} correctly increments — but
> {{numGetBlock}} also increments, even though SCR did not use the remote/gRPC
> read path.
> This makes {{numGetBlock}} unreliable for SCR validation and causes
> double-counting in datanode metrics.
> *Expected behavior:*
> * SCR reads should increment only {{{}numLocalGetBlock{}}}. gRPC reads
> should increment only {{{}numGetBlock{}}}.
> *Actual behavior:*
> * SCR reads increment both numLocalGetBlock and numGetBlock is incremented
> twice for one read.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]