未验证 提交 68727ee8 编写于 作者: I inversionhourglass 提交者: GitHub

Fix gRPC alarm cannot update settings from dynamic configuration source.(#10274) (#10275)

上级 3220339a
......@@ -77,6 +77,7 @@
* Add the eBPF network profiling E2E Test in the per storage.
* Fix TCP service instances are lack of instance properties like `pod` and `namespace`, which causes Pod log not to work for TCP workloads.
* Add Python HBase happybase module component ID(94).
* Fix gRPC alarm cannot update settings from dynamic configuration source.
#### UI
......
......@@ -60,19 +60,15 @@ public class GRPCCallback implements AlarmCallback {
@Override
public void doAlarm(List<AlarmMessage> alarmMessage) {
if (alarmSetting == null || alarmSetting.isEmptySetting()) {
return;
}
// recreate gRPC client and stub if host and port configuration changed.
onGRPCAlarmSettingUpdated(alarmRulesWatcher.getGrpchookSetting());
GRPCStreamStatus status = new GRPCStreamStatus();
if (alarmServiceStub == null) {
if (alarmSetting == null || alarmSetting.isEmptySetting() || alarmServiceStub == null) {
return;
}
GRPCStreamStatus status = new GRPCStreamStatus();
StreamObserver<org.apache.skywalking.oap.server.core.alarm.grpc.AlarmMessage> streamObserver =
alarmServiceStub.withDeadlineAfter(10, TimeUnit.SECONDS).doAlarm(new StreamObserver<Response>() {
@Override
......@@ -156,6 +152,7 @@ public class GRPCCallback implements AlarmCallback {
}
if (!grpcAlarmSetting.equals(alarmSetting)) {
alarmSetting = grpcAlarmSetting;
if (grpcClient != null) {
grpcClient.shutdown();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册