[ISSUE #3876][NA] failed to update serviceName: DEFAULT_GROUP@@prod-zipkin (#4864)

This commit is contained in:
JackSun-Developer 2021-02-05 09:16:13 +08:00 committed by GitHub
parent 6379ba25bf
commit 9ce5501b8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,6 +102,16 @@ public class InstanceController {
client.getClusters(), client.getSocketAddr().getAddress().getHostAddress(), 0,
StringUtils.EMPTY, false, StringUtils.EMPTY, StringUtils.EMPTY, false);
} catch (Exception e) {
String serviceNameField = "name";
String lastRefTimeField = "lastRefTime";
if (result.get(serviceNameField) == null) {
String serviceName = client.getServiceName();
if (serviceName == null) {
serviceName = StringUtils.trimToEmpty(serviceName);
}
result.put(serviceNameField, serviceName);
result.put(lastRefTimeField, System.currentTimeMillis());
}
Loggers.SRV_LOG.warn("PUSH-SERVICE: service is not modified", e);
}