This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch branch-0.7
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/branch-0.7 by this push:
new 06c80243 [#933][0.7] fix: incorrect metric
grpc_server_connection_number (#941)
06c80243 is described below
commit 06c8024333a814b88e227cd098193d7e322645aa
Author: xianjingfeng <[email protected]>
AuthorDate: Fri Jun 9 22:26:44 2023 +0800
[#933][0.7] fix: incorrect metric grpc_server_connection_number (#941)
### 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);
}
}