-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
kind/bugCategory issues or prs related to bug.Category issues or prs related to bug.
Milestone
Description
Describe the bug
Finally code block will always execute. So incFailCount() will always execute. And when queryInstancesOfService error delayTime = -1, this task will also be stopped.
Why need add delayTime > 0 check , should a default value be given.
nacos/client/src/main/java/com/alibaba/nacos/client/naming/core/ServiceInfoUpdateService.java
Lines 190 to 201 in eb36581
| } | |
| // TODO multiple time can be configured. | |
| delayTime = serviceObj.getCacheMillis() * DEFAULT_UPDATE_CACHE_TIME_MULTIPLE; | |
| resetFailCount(); | |
| } catch (Throwable e) { | |
| NAMING_LOGGER.warn("[NA] failed to update serviceName: " + groupedServiceName, e); | |
| } finally { | |
| incFailCount(); | |
| if (delayTime > 0) { | |
| executor.schedule(this, Math.min(delayTime << failCount, DEFAULT_DELAY * 60), TimeUnit.MILLISECONDS); | |
| } | |
| } |
Desktop (please complete the following information):
- OS: [e.g. Centos]
- Version [e.g. nacos-server 2.0.0, nacos-client 2.0.0]
- Module [e.g. naming]
- SDK [java]
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
kind/bugCategory issues or prs related to bug.Category issues or prs related to bug.