You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by xi...@apache.org on 2023/06/07 03:05:27 UTC
[incubator-uniffle] 01/01: fix incorrect metric grpc_server_connection_number
This is an automated email from the ASF dual-hosted git repository.
xianjingfeng pushed a commit to branch issue_933
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
commit 18c07b8dd389aa1d5e9e3e4bdab8f30dc492675a
Author: xianjingfeng <xi...@gmail.com>
AuthorDate: Wed Jun 7 11:00:58 2023 +0800
fix incorrect metric grpc_server_connection_number
---
.../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);
}
}