Aias00 opened a new issue, #6500:
URL: https://github.com/apache/shenyu/issues/6500
### Current Behavior
Eureka instance watch polling can stop permanently after one polling error.
`EurekaInstanceRegisterRepository.watchInstances()` schedules a fixed-rate
polling task. The task catches exceptions, logs them, and then rethrows as
`ShenyuException`:
```java
ScheduledFuture<?> scheduledFuture = executorService.scheduleAtFixedRate(()
-> {
try {
...
} catch (Exception e) {
LOGGER.error("eureka registry eurekaDiscoveryService watch key: {}
error", key, e);
throw new ShenyuException(e);
}
}, 0, 1, TimeUnit.SECONDS);
```
An exception escaping a `ScheduledThreadPoolExecutor` periodic task
suppresses subsequent executions. So a single transient Eureka client error can
stop future instance polling for that watched key.
### Expected Behavior
Eureka watch polling should log transient errors and retry in the next
scheduled interval without letting exceptions escape the periodic task.
### Impact
After one polling error, instance add/delete changes for the watched service
can stop propagating until the watcher is recreated or the process restarts.
### Code Location
-
`shenyu-registry/shenyu-registry-eureka/src/main/java/org/apache/shenyu/registry/eureka/EurekaInstanceRegisterRepository.java`
- `watchInstances()` rethrows from inside the scheduled polling task.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]