sunnysabor opened a new pull request, #7681:
URL: https://github.com/apache/shenyu/pull/7681

   Follow-up to #7651.
   
   The match cache can retain valid entries across configuration updates even 
when the selector/rule that produced them is no longer the winner. This change 
scopes rule matches to the selected selector and a BaseDataCache generation, so 
an in-flight request cannot repopulate a cache entry used after a later update. 
It only caches results when every enabled candidate uses stable URI conditions, 
uses the rewritten path as the key, and clears match entries in `finally` 
blocks if a plugin data handler throws. BaseDataCache serializes batch snapshot 
publication with incremental writes/deletes, cascades selector/plugin removal 
to child rules, and removes IDs that move between groups.
   
   The generation is global to BaseDataCache: each config mutation makes 
earlier derived entries unreachable, and their bounded TTL reclaims them later. 
Config writes are infrequent, so they are serialized on the cache writer 
monitor; request reads remain unsynchronized. Dynamic header/query conditions 
skip match-result caching. The existing configurable TTL from #7664 remains the 
upper bound for unused old generations.
   
   Validation:
   - 94 tests pass in the 11-module `shenyu-plugin-base -am` reactor, including 
deterministic refresh/delete/update interleavings and regressions for 
selector/rule priority, dynamic request conditions, selector scoping, rewritten 
paths, cascaded deletion, and handler exceptions.
   - Full repository Checkstyle passes across 213 modules.
   - Related reactor RAT passes on a clean tracked-source export with this 
patch.
   - `git diff --check` passes. A full repository clean install was not run.
   


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