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

   - severity: Medium
   - files: 
`shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/cache/CommonPluginDataSubscriber.java:287-296`
 (`removeCacheData` SelectorData branch) vs `:232-245` (`updateCacheData` 
SelectorData branch)
   - description: On selector *update* the code invalidates both caches (incl. 
`removeRuleDataBySelector` + `removeEmptyRuleData` at lines 243-244). On 
selector *delete* (lines 292-296) only the SELECTOR match cache is invalidated; 
the RULE match cache is NOT. `MatchDataCache` stores `path -> RuleData` whose 
`selectorId` references the now-deleted selector. 
`AbstractShenyuPlugin.execute` then calls `doExecute(exchange, chain, 
selectorData, ruleData)` with a rule tied to a dead selector until (and if) the 
corresponding rule-delete events arrive separately. If rules are orphaned the 
staleness is permanent.
   - impact: Routing to a deleted selector's rule; window of inconsistency 
under normal cascade, permanent if orphaned.
   - suggested_fix: In `removeCacheData` SelectorData branch, add the same two 
calls present in `updateCacheData`: 
`MatchDataCache.getInstance().removeRuleDataBySelector(...)` and 
`removeEmptyRuleData(...)`.
   - confidence: High
   
   ---
   _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]

Reply via email to