Aias00 opened a new issue, #6545:
URL: https://github.com/apache/shenyu/issues/6545
## Description
`FailureRegistryTask` is constructed with `retryCount = 18`, so `retryLimit
= (18 < 0) = false`. After 18 consecutive failures, `tickCount` reaches 19; the
guard `!retryLimit && tickCount > retryCount` is true, so `run()` logs "task
over" and returns **without** calling `remove(key)` and **without**
rescheduling. The `Holder` for that key stays in `concurrentHashMap` forever.
`addToFail` then short-circuits on the stuck entry: `if
(Objects.nonNull(oldObj)) { return; }` — no new `FailureRegistryTask` is ever
scheduled again for that key.
## Location
```
shenyu-common/.../timer/AbstractRetryTask.java:107-110 (exhaustion branch —
returns without cleanup)
shenyu-register-client-api/.../retry/FailureRegistryTask.java:54-58 (doRetry
— only removes on success)
shenyu-register-client-api/.../FailbackRegistryRepository.java:175-184
(addToFail — early-returns when key present)
```
## Impact
After ~3 minutes (18 x 10s) of sustained failure the admin becomes reachable
again, but the client never re-registers that URI/metadata because every
subsequent failure for the same key hits the stuck entry. Also a memory leak
(`concurrentHashMap` grows with dead entries).
## Suggested fix
In the `AbstractRetryTask.run()` exhaustion branch, call a cleanup hook
(e.g. `onGiveUp(key)` overridden by `FailureRegistryTask` to call
`registerRepository.remove(key)`) before returning, so future failures can
schedule a fresh task. Alternatively, have `doRetry` remove the entry in a
`finally` and re-add on next failure.
## Related existing issue(s)
None
_Identified during the 2026-08-02 audit; full list in
[`docs/issue-candidates-2026-08-02.md`](docs/issue-candidates-2026-08-02.md)._
--
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]