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

   - severity: Medium-High; files: `mappers/plugin-sqlmap.xml:86-125` 
(`selectByQuery`/`selectAll`) and `:160-185` (`activePluginSnapshot`); 
`Base_Column_List:35-46` includes `plugin_jar`
   - description: `activePluginSnapshot` does `LEFT JOIN selector s ON p.id = 
s.plugin_id` but `selector` has no index on `plugin_id` (only PK) → full scan 
of `selector` per plugin row. `resource.parent_id`, `permission.object_id`, 
`permission.resource_id`, `user_role.user_id` all unindexed → nested correlated 
subqueries do full scans. `selectByQuery`/`selectAll` fetch `plugin_jar` BLOB 
per row and use leading-wildcard `LIKE` on `name`/`role`.
   - impact: Snapshot/dashboard query cost is O(plugins × selectors) plus 
multiple full scans; BLOB transfer bloats list responses.
   - suggested_fix: Add `index on selector(plugin_id)`; add indexes on 
`permission(object_id)`, `permission(resource_id)`, `resource(parent_id)`, 
`user_role(user_id)`; drop `plugin_jar` from `Base_Column_List` for list paths.
   - 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