Skip to content

fix(limit-conn): isolate counter per workflow action via _vid key#13591

Open
shreemaan-abhishek wants to merge 1 commit into
apache:masterfrom
shreemaan-abhishek:fix/limit-conn-vid-workflow
Open

fix(limit-conn): isolate counter per workflow action via _vid key#13591
shreemaan-abhishek wants to merge 1 commit into
apache:masterfrom
shreemaan-abhishek:fix/limit-conn-vid-workflow

Conversation

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

Description

When two or more limit-conn actions are configured inside a single workflow rule, the workflow plugin assigns each action a distinct _vid on its conf, but limit-conn never folds that _vid into the limit key. As a result every action builds the same shared counter key and the actions throttle one combined connection counter instead of being limited independently.

limit-count already folds _vid into its key for exactly this reason, so this is an inconsistency specific to limit-conn. This PR brings limit-conn to parity by appending _vid to the key when present, and adds a workflow3.t test with two independent limit-conn actions.

Which issue(s) this PR fixes:

N/A

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

When multiple limit-conn actions are configured in a single workflow
rule, the workflow plugin sets a per-action _vid on each conf but
limit-conn never folded it into the limit key, so all actions shared
one connection counter instead of being limited independently.

Fold _vid into the key, matching what limit-count already does.
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant