rich7420 opened a new pull request, #11738:
URL: https://github.com/apache/ozone/pull/11738

   ## What changes were proposed in this pull request?
   
   Adds per-command OM client latency metrics so S3 Gateway operators can 
distinguish slow metadata calls from datanode operations. The shared translator 
measures `OmTransport.submitRequest`, including calls deferred until an output 
stream closes, such as `CommitKey`.
   
   Each completed submission contributes one nanosecond sample, including 
exceptions and OM error responses. Internal transport retries are included in 
that sample; retries outside the transport produce separate samples and exclude 
the intervening delay. These are client call-path latencies, not OM server 
processing times or physical RPC counts.
   
   `OmClientMetrics` reuses `PerformanceMetrics` and creates statistics only 
for observed command types. Successfully initialized `RpcClient` instances 
share the process-wide source through idempotent handles; the last client 
closes its percentile tasks and unregisters the source. Background calls are 
included, while bootstrap requests during client construction are excluded. The 
source does not initialize or shut down the metrics system.
   
   `ozone.om.client.metrics.percentiles.intervals.seconds` defaults to `60`. An 
empty value disables percentiles; invalid or duplicate intervals fall back to 
the default. The first active client supplies the process-wide intervals.
   
   This PR covers the OM portion of HDDS-17169. Existing ordinary datanode 
latency output is verified; datastream and streaming-read instrumentation and 
the existing Xceiver metrics lifetime issue remain separate work.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-17169](https://issues.apache.org/jira/browse/HDDS-17169)
   
   ## How was this patch tested?
   
   - `TestOmClientMetrics` (12), 
`TestOzoneManagerProtocolClientSideTranslatorPB` (21), `TestRpcClient` (181), 
`TestS3ClientMetrics` (3), and `TestOzoneConfigurationFields` (5): 222 tests 
passed. Covers non-OK responses, exceptions, internal and outer retries, 
concurrent first use, multiple owners, failed construction, and shutdown.
   - Real S3 HTTP integration covers PUT/GET/HEAD/LIST, multipart commit, and 
missing-key errors. Gateway `/prom` and `/jmx` assertions pass, as does the 
normal mini-cluster metrics leak check without allowlist changes.
   - A separate three-datanode compose cluster verifies the S3 Gateway 
process's `/prom` and `/jmx` output through AWS CLI PUT/GET/LIST and HEAD 404. 
Both OM and ordinary DN latency counters increase; downloaded content matches 
the upload. This uses non-secure mode and the repository's JDK 25 runner image.
   - Distribution build, dependency analysis, checkstyle, RAT, author check, 
and targeted PMD pass. The distribution dependency report differs only by the 
two filesystem jars omitted by `-DskipShade`.
   
   - 10×10 repeated tests on JDK 21 passed: [OM metrics and 
translator](https://github.com/rich7420/ozone/actions/runs/40079986569), 
[RpcClient](https://github.com/rich7420/ozone/actions/runs/40079988436), and 
[S3 client 
metrics](https://github.com/rich7420/ozone/actions/runs/40079990537). Each 
class ran 100 times, with zero failures or skipped tests.
   - [Full fork CI](https://github.com/rich7420/ozone/actions/runs/40079920150) 
is still running. Build and basic checks passed; the PR remains Draft pending 
the remaining checks.
   


-- 
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]

Reply via email to