Aias00 opened a new issue, #6787: URL: https://github.com/apache/shenyu/issues/6787
- Severity: Medium - Location: `shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/disruptor/subcriber/ShenyuClientURIExecutorSubscriber.java:50` - Description: `URIS` is `private static final List<URIRegisterDTO> URIS = new CopyOnWriteArrayList<>()`, never cleared. On context restart in the same JVM (Spring DevTools, integration tests, embedded multi-app), URIs from the previous context remain; the heartbeat scheduler (line 67) sends heartbeats to dead/stale URIs; on shutdown the offline hook (line 105-115) sends `EventType.OFFLINE` for stale URIs that no longer correspond to a live instance. When `ShenyuClientRegisterEventPublisher.start()` is called multiple times (FUNC-B3), multiple subscriber instances each add to and heartbeat the same shared static list and each register an offline hook for all accumulated URIs. - Impact: Stale heartbeat traffic to dead instances after restart; duplicate offline events; interference between different client type registrations sharing the same URIS list. - Suggested fix: Make `URIS` an instance field so each subscriber tracks its own URIs; clear the list on shutdown; key URIs by namespace+contextPath+host+port and deduplicate. - Confidence: Medium - Related existing: FUNC-B3 — covers the static URIS sharing across multiple `start()` calls; this adds the distinct stale-entries-across-context-restart facet (never cleared, DevTools/restart leaks). --- _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.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]
