Skip to content

fix(plugin): remove cached rules without handles - #7132

Merged
dengliming merged 1 commit into
apache:masterfrom
dengliming:fix-6772-remove-null-handle-rule-cache
Sep 19, 2026
Merged

dengliming merged 1 commit into
apache:masterfrom
dengliming:fix-6772-remove-null-handle-rule-cache

Conversation

@dengliming

Copy link
Copy Markdown
Member

Summary

  • remove redirect, rewrite, parameter-mapping, modify-response, and context-path cache entries without requiring a rule handle
  • retain null rule protection while using selector and rule identifiers for eviction
  • add regression coverage for null-handle deletion events in all five plugin paths

Testing

  • mvn -q -pl shenyu-plugin/shenyu-plugin-redirect,shenyu-plugin/shenyu-plugin-rewrite,shenyu-plugin/shenyu-plugin-param-mapping,shenyu-plugin/shenyu-plugin-modify-response,shenyu-plugin/shenyu-plugin-context-path -am -DskipTests=false -Dcheckstyle.skip=false -Dtest=RedirectPluginTest,RewritePluginDataHandlerTest,ParamMappingPluginDataTest,ModifyResponsePluginDataHandlerTest,ContextPathPluginDataHandlerTest -DfailIfNoTests=false test

Fixes #6772

@Aias00 Aias00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as PMC (Aias00). Reviewed the diff — small, well-scoped fix with regression tests; mergeable.

@dengliming
dengliming merged commit 314dfbc into apache:master Sep 19, 2026
37 checks passed
eye-gu pushed a commit to eye-gu/shenyu that referenced this pull request Sep 30, 2026
@Aias00 Aias00 added this to the 2.7.2 milestone Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Data-handler removeRule guards on ruleData.getHandle(), leaking cache entries when handle is null at deletion time

2 participants