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

   ### Current Behavior
   
   Discovery upstream delete events are not applied to gateway-side caches.
   
   For path-based sync, admin deletes discovery-upstream nodes under 
`/.../discoveryUpstream/<plugin>/<selectorId>`, but 
`AbstractPathDataSyncService.discoveryUpstreamHandlerEvent()` ignores `DELETE` 
events entirely:
   
   ```java
   if (!EventType.DELETE.equals(eventType)) {
       ... cacheDiscoveryUpstreamData(...)
   }
   ```
   
   For node/websocket-style sync paths, delete events can reach 
`DiscoveryUpstreamDataSubscriber.unSubscribe(...)`, but 
`CommonDiscoveryUpstreamDataSubscriber.unSubscribe()` is currently a no-op.
   
   ### Expected Behavior
   
   Deleting discovery upstream data in admin should remove or refresh the 
corresponding gateway-side upstream cache for the plugin/selector.
   
   ### Impact
   
   Deleted discovery upstreams can remain cached and routable in gateway 
instances after admin has removed them. This affects path-based sync backends 
and any backend that reaches the common no-op unsubscribe path.
   
   ### Code Location
   
   - 
`shenyu-admin-listener/shenyu-admin-listener-api/src/main/java/org/apache/shenyu/admin/listener/AbstractPathDataChangedListener.java`
     - deletes discovery upstream paths.
   - 
`shenyu-sync-data-center/shenyu-sync-data-api/src/main/java/org/apache/shenyu/sync/data/core/AbstractPathDataSyncService.java`
     - `discoveryUpstreamHandlerEvent()` ignores deletes.
   - 
`shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/cache/CommonDiscoveryUpstreamDataSubscriber.java`
     - `unSubscribe()` is a no-op.
   


-- 
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