Commit a0ba48d 1 parent c702e3a commit a0ba48d Copy full SHA for a0ba48d
File tree 1 file changed +6
-3
lines changed
pinot-core/src/main/java/org/apache/pinot/core/transport/grpc
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,12 @@ public Attributes transportReady(Attributes transportAttrs) {
89
89
90
90
@ Override
91
91
public void transportTerminated (Attributes transportAttrs ) {
92
- LOGGER .info ("gRPC transportTerminated: REMOTE_ADDR {}" ,
93
- transportAttrs != null ? transportAttrs .get (Grpc .TRANSPORT_ATTR_REMOTE_ADDR ) : "null" );
94
- _serverMetrics .addMeteredGlobalValue (ServerMeter .GRPC_TRANSPORT_TERMINATED , 1 );
92
+ // transportTerminated can be called without transportReady before it, e.g. handshake fails
93
+ // So, don't emit metrics if transportAttrs is null
94
+ if (transportAttrs != null ) {
95
+ LOGGER .info ("gRPC transportTerminated: REMOTE_ADDR {}" , transportAttrs .get (Grpc .TRANSPORT_ATTR_REMOTE_ADDR ));
96
+ _serverMetrics .addMeteredGlobalValue (ServerMeter .GRPC_TRANSPORT_TERMINATED , 1 );
97
+ }
95
98
}
96
99
}
97
100
You can’t perform that action at this time.
0 commit comments