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

   - severity: High; files: 
`shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ProxySelectorServiceImpl.java:113-148`;
 SQL `discovery-rel-sqlmap.xml:54-59`, `discovery-upstream-sqlmap.xml:145-150`
   - description: Inside the `forEach` over `proxySelectorMapper.selectByQuery` 
results, for EACH row the method issues 4 separate mapper calls 
(`discoveryRelMapper.selectByProxySelectorId`, 
`discoveryHandlerMapper.selectById`, `discoveryMapper.selectById`, 
`discoveryUpstreamMapper.selectByDiscoveryHandlerId`). `discovery_rel` has no 
index on `proxy_selector_id`/`discovery_handler_id`.
   - impact: List latency grows linearly with page size × 4 round-trips; 
seconds on large inventories.
   - suggested_fix: Batch-fetch `discovery_rel` by `proxy_selector_id IN (...)` 
once, then batch the referenced handlers/discoveries/upstreams; or rewrite as a 
single JOIN.
   - confidence: High
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in 
[`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.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