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

   ## Goal
   Reduce repeated list copying, sorting and match-cache invalidation during 
initial synchronization and reconnect snapshots while preserving configuration 
semantics.
   
   ## Current evidence
   `CommonPluginDataSubscriber.applySelectorDataSnapshot/applyRuleDataSnapshot` 
calls per-item subscribe methods. These reach single-item upserts and 
invalidation. `BaseDataCache` already has grouped batch-refresh helpers that 
merge and sort once per key, so reuse existing machinery where its semantics 
fit. A snapshot also removes stale namespace entries; existing merge helpers 
alone are not a replacement for snapshot semantics.
   
   [Source at reviewed 
commit](https://github.com/apache/shenyu/blob/b4e115367fd57adc8aba332d655b1009932ba394/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/cache/CommonPluginDataSubscriber.java#L162)
   
   Related historical work: #6796 addressed repeated sorting in cache refresh 
paths; this issue focuses on namespace snapshot application at the reviewed 
commit.
   
   ## Scope and acceptance criteria
   - [ ] Group selector updates per plugin and rule updates per selector; 
merge/sort once per affected group.
   - [ ] Coalesce appropriate match-cache invalidation without retaining stale 
positive or negative results.
   - [ ] Preserve plugin-handler callbacks, deletion semantics, ordering, 
namespace isolation and empty-snapshot cleanup.
   - [ ] Define/test ordering against concurrent incremental updates; do not 
claim whole-system atomicity from per-list replacement.
   - [ ] Benchmark 1k/10k+ configurations with a fixed shape, both cold 
initialization and reconnect, while business requests run.
   - [ ] Report snapshot apply time, allocations/GC, convergence and business 
p99 disturbance; final configuration and routing match the reference behavior.
   


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