Aias00 opened a new issue, #6661:
URL: https://github.com/apache/shenyu/issues/6661

   - Severity: High
   - Location:
   
`shenyu-sync-data-center/shenyu-sync-data-api/src/main/java/org/apache/shenyu/sync/data/core/AbstractPathDataSyncService.java:132-141`
   - 
   Description:
   The method body is `if (!EventType.DELETE.equals(eventType)) { 
Optional.ofNullable(updateData).ifPresent(e -> 
cacheDiscoveryUpstreamData(...)); }` — no `else` branch for DELETE; no 
`unCacheDiscoveryUpstreamData` call (or method) exists. The etcd 
`watchChildChange` delete callback (`EtcdSyncDataService.java:88`) correctly 
fires `super.event(..., null, ..., EventType.DELETE)` for discovery upstream 
deletions, and `event()` dispatches to `discoveryUpstreamHandlerEvent`, but the 
handler silently drops it. Every other handler (`pluginHandlerEvent`, 
`selectorHandlerEvent`, `ruleHandlerEvent:144-146`, 
`appAuthHandlerEvent:153-155`, `metaDataHandlerEvent:161-167`, 
`proxyHandlerEvent:118-123`) correctly handles DELETE — only discovery upstream 
is missing.
   - 
   Impact:
   On etcd sync, when a discovery upstream is deleted, the gateway never 
removes it from the subscriber cache. Stale upstream endpoints continue to 
receive traffic.
   - 
   Suggested fix:
   Add a `DELETE` branch that parses plugin name and selector name from 
`updatePath` (same `split("/")` pattern as `proxyHandlerEvent`), constructs a 
`DiscoverySyncData`, and calls a new `unCacheDiscoveryUpstreamData(...)` that 
delegates to `discoveryUpstreamDataSubscribers.forEach(e -> 
e.unSubscribe(...))`.
   - 
   Confidence: High
   - Related existing: none
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in 
[`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.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]

Reply via email to