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

   ### Is there an existing issue for this?
   
   - [x] I have searched the existing issues
   
   ### Current Behavior
   
   
[AbstractWasmDiscoveryHandler](https://github.com/apache/shenyu/blob/2dff2730ff399635b2bc657e21a903f391fb9df8/shenyu-plugin/shenyu-plugin-wasm-base/src/main/java/org/apache/shenyu/plugin/wasm/base/handler/AbstractWasmDiscoveryHandler.java#L31)
 implements only `handlerDiscoveryUpstreamData`.
   
   
[CommonDiscoveryUpstreamDataSubscriber](https://github.com/apache/shenyu/blob/2dff2730ff399635b2bc657e21a903f391fb9df8/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/cache/CommonDiscoveryUpstreamDataSubscriber.java#L49)
 dispatches deletion through 
`removeDiscoveryUpstreamData(DiscoveryUpstreamKey)`. Because the WASM handler 
does not override it, it inherits the [interface's empty 
implementation](https://github.com/apache/shenyu/blob/2dff2730ff399635b2bc657e21a903f391fb9df8/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/handler/DiscoveryUpstreamDataHandler.java#L37).
   
   A guest that maintains discovery state receives updates but receives no 
deletion notification through this base class.
   
   ### Expected Behavior
   
   Forward deletion to a documented guest callback, including the 
DiscoveryUpstreamKey data needed to remove the relevant state. Define behavior 
for guests that do not implement this callback.
   
   ### Steps To Reproduce
   
   Source-derived scenario:
   1. Implement a WASM discovery handler using the existing base class, without 
a custom Java deletion override.
   2. Deliver an upstream update and store it in guest state.
   3. Deliver a deletion through the discovery subscriber.
   4. No guest deletion callback is invoked; guest-maintained state can retain 
the removed upstream.
   
   ### Environment
   
   ShenYu: `2.7.2-SNAPSHOT`, commit `2dff2730ff399635b2bc657e21a903f391fb9df8`; 
Java 17; Chicory 1.7.3.
   
   ### Anything else?
   
   Current Go/Rust discovery tests cover updates only. Add deletion coverage 
through both the handler and subscriber, including a missing optional export 
case.
   
   


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