This is an automated email from the ASF dual-hosted git repository.
xianjingfeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new b6a725ba [#933] fix incorrect metric grpc_server_connection_number
(#934)
b6a725ba is described below
commit b6a725baf6e788699aa2521456a85687f4545a53
Author: xianjingfeng <[email protected]>
AuthorDate: Thu Jun 8 15:41:46 2023 +0800
[#933] fix incorrect metric grpc_server_connection_number (#934)
### What changes were proposed in this pull request?
Fix incorrect metric grpc_server_connection_number
### Why are the changes needed?
Fix: #933
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
Existing UT
---
.../apache/uniffle/common/rpc/MonitoringServerTransportFilter.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/common/src/main/java/org/apache/uniffle/common/rpc/MonitoringServerTransportFilter.java
b/common/src/main/java/org/apache/uniffle/common/rpc/MonitoringServerTransportFilter.java
index 2c29dd27..ef687ec4 100644
---
a/common/src/main/java/org/apache/uniffle/common/rpc/MonitoringServerTransportFilter.java
+++
b/common/src/main/java/org/apache/uniffle/common/rpc/MonitoringServerTransportFilter.java
@@ -37,7 +37,9 @@ public class MonitoringServerTransportFilter extends
ServerTransportFilter {
}
public void transportTerminated(Attributes transportAttrs) {
- grpcMetrics.decGauge(GRPC_SERVER_CONNECTION_NUMBER_KEY);
+ if (transportAttrs != null) {
+ grpcMetrics.decGauge(GRPC_SERVER_CONNECTION_NUMBER_KEY);
+ }
super.transportTerminated(transportAttrs);
}
}