Fix frequent do query service when hit protect empty. (#11197)

This commit is contained in:
杨翊 SionYang 2023-09-27 15:52:38 +08:00 committed by GitHub
parent 57efe9f520
commit 6dd88db501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,6 +191,8 @@ public class ServiceInfoUpdateService implements Closeable {
if (serviceObj == null) { if (serviceObj == null) {
serviceObj = namingClientProxy.queryInstancesOfService(serviceName, groupName, clusters, false); serviceObj = namingClientProxy.queryInstancesOfService(serviceName, groupName, clusters, false);
serviceInfoHolder.processServiceInfo(serviceObj); serviceInfoHolder.processServiceInfo(serviceObj);
// TODO multiple time can be configured.
delayTime = serviceObj.getCacheMillis() * DEFAULT_UPDATE_CACHE_TIME_MULTIPLE;
lastRefTime = serviceObj.getLastRefTime(); lastRefTime = serviceObj.getLastRefTime();
return; return;
} }