修改: Fix 12301。 (#12310)
This commit is contained in:
parent
48a0f8b0fb
commit
525f3bf43f
@ -16,6 +16,7 @@
|
||||
|
||||
package com.alibaba.nacos.naming.core.v2.pojo;
|
||||
|
||||
import com.alibaba.nacos.api.common.Constants;
|
||||
import com.alibaba.nacos.api.naming.utils.NamingUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -96,6 +97,11 @@ public class Service implements Serializable {
|
||||
return NamingUtils.getGroupedName(name, group);
|
||||
}
|
||||
|
||||
public String getNameSpaceGroupedServiceName() {
|
||||
//do not String.intern
|
||||
return namespace + Constants.SERVICE_INFO_SPLITER + NamingUtils.getGroupedName(name, group);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
|
@ -102,7 +102,7 @@ public class TcpHealthCheckProcessor implements HealthCheckProcessorV2, Runnable
|
||||
// TODO handle marked(white list) logic like v1.x.
|
||||
if (!instance.tryStartCheck()) {
|
||||
SRV_LOG.warn("[HEALTH-CHECK-V2] tcp check started before last one finished, service: {} : {} : {}:{}",
|
||||
service.getGroupedServiceName(), instance.getCluster(), instance.getIp(), instance.getPort());
|
||||
service.getNameSpaceGroupedServiceName(), instance.getCluster(), instance.getIp(), instance.getPort());
|
||||
healthCheckCommon
|
||||
.reEvaluateCheckRT(task.getCheckRtNormalized() * 2, task, switchDomain.getTcpHealthParams());
|
||||
return;
|
||||
@ -287,7 +287,7 @@ public class TcpHealthCheckProcessor implements HealthCheckProcessorV2, Runnable
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return service.getGroupedServiceName() + ":" + instance.getCluster() + ":" + instance.getIp() + ":"
|
||||
return service.getNameSpaceGroupedServiceName() + ":" + instance.getCluster() + ":" + instance.getIp() + ":"
|
||||
+ instance.getPort();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user