fat-catTW opened a new pull request, #12132: URL: https://github.com/apache/ozone/pull/12132
## What changes were proposed in this pull request? OM's S3 gRPC server counts active client connections through a transport filter. A TCP health check, port scan, or failed TLS handshake can terminate before the transport becomes ready. The filter previously decremented the connection count anyway, which caused `NumOpenClientConnections` to become negative. This change decrements the count only when `transportTerminated` receives non-null attributes. It also changes `NumOpenClientConnections` from `MutableCounterLong` to `MutableGaugeLong`, so Prometheus exports it as a gauge rather than a counter. Regression tests cover both termination-before-ready and the normal ready-to-terminated lifecycle. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17888 ## How was this patch tested? ```bash mvn -pl :hdds-server-framework -am test \ -Dtest=TestGrpcMetrics \ -Dsurefire.failIfNoSpecifiedTests=false \ -DskipShade -DskipRecon -- 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]
