This commit is contained in:
parent
9ab1d62a06
commit
07f38a4763
@ -112,15 +112,17 @@ public class IpPortBasedClient extends AbstractClient {
|
||||
}
|
||||
|
||||
private HealthCheckInstancePublishInfo parseToHealthCheckInstance(InstancePublishInfo instancePublishInfo) {
|
||||
HealthCheckInstancePublishInfo result;
|
||||
if (instancePublishInfo instanceof HealthCheckInstancePublishInfo) {
|
||||
return (HealthCheckInstancePublishInfo) instancePublishInfo;
|
||||
}
|
||||
HealthCheckInstancePublishInfo result = new HealthCheckInstancePublishInfo();
|
||||
result = (HealthCheckInstancePublishInfo) instancePublishInfo;
|
||||
} else {
|
||||
result = new HealthCheckInstancePublishInfo();
|
||||
result.setIp(instancePublishInfo.getIp());
|
||||
result.setPort(instancePublishInfo.getPort());
|
||||
result.setHealthy(instancePublishInfo.isHealthy());
|
||||
result.setCluster(instancePublishInfo.getCluster());
|
||||
result.setExtendDatum(instancePublishInfo.getExtendDatum());
|
||||
}
|
||||
if (!ephemeral) {
|
||||
result.initHealthCheck();
|
||||
}
|
||||
|
@ -98,12 +98,12 @@ public class HealthCheckTaskV2 extends AbstractExecuteTask implements NacosHealt
|
||||
ClusterMetadata metadata = getClusterMetadata(each, instancePublishInfo);
|
||||
ApplicationUtils.getBean(HealthCheckProcessorV2Delegate.class).process(this, each, metadata);
|
||||
if (Loggers.EVT_LOG.isDebugEnabled()) {
|
||||
Loggers.EVT_LOG.debug("[HEALTH-CHECK] schedule health check task: {}", client.getClientId());
|
||||
Loggers.EVT_LOG.debug("[HEALTH-CHECK-V2] schedule health check task: {}", client.getClientId());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
Loggers.SRV_LOG.error("[HEALTH-CHECK] error while process health check for {}", client.getClientId(), e);
|
||||
Loggers.SRV_LOG.error("[HEALTH-CHECK-V2] error while process health check for {}", client.getClientId(), e);
|
||||
} finally {
|
||||
if (!cancelled) {
|
||||
HealthCheckReactor.scheduleCheck(this);
|
||||
|
@ -101,7 +101,7 @@ public class TcpHealthCheckProcessor implements HealthCheckProcessorV2, Runnable
|
||||
}
|
||||
// TODO handle marked(white list) logic like v1.x.
|
||||
if (!instance.tryStartCheck()) {
|
||||
SRV_LOG.warn("tcp check started before last one finished, service: {} : {} : {}:{}",
|
||||
SRV_LOG.warn("[HEALTH-CHECK-V2] tcp check started before last one finished, service: {} : {} : {}:{}",
|
||||
service.getGroupedServiceName(), instance.getCluster(), instance.getIp(), instance.getPort());
|
||||
healthCheckCommon
|
||||
.reEvaluateCheckRT(task.getCheckRtNormalized() * 2, task, switchDomain.getTcpHealthParams());
|
||||
@ -151,7 +151,7 @@ public class TcpHealthCheckProcessor implements HealthCheckProcessorV2, Runnable
|
||||
GlobalExecutor.executeTcpSuperSense(new PostProcessor(key));
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
SRV_LOG.error("[HEALTH-CHECK] error while processing NIO task", e);
|
||||
SRV_LOG.error("[HEALTH-CHECK-V2] error while processing NIO task", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user