Skip to content

fix(divide): release p2c inflight on cancellation - #7096

Merged
Aias00 merged 3 commits into
apache:masterfrom
dengliming:fix-6733-release-p2c-inflight-on-cancel
Sep 30, 2026
Merged

Aias00 merged 3 commits into
apache:masterfrom
dengliming:fix-6733-release-p2c-inflight-on-cancel

Conversation

@dengliming

Copy link
Copy Markdown
Member

Fixes #6733

P2C response accounting now uses doFinally, so the selected upstream inflight counter is released for completion, error, and downstream cancellation.

The regression test subscribes to a non-terminating downstream request, cancels it, and verifies that the inflight count is decremented.

Test:

  • mvn -pl shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-divide -am -DskipTests=false -Dcheckstyle.skip=false -Dtest=DividePluginTest -DfailIfNoTests=false test

Copilot AI 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.

🟢 Approval recommended

The focused implementation correctly handles cancellation and includes appropriate regression coverage.

Pull request overview

Fixes P2C inflight leakage when downstream requests are cancelled.

Changes:

  • Releases P2C inflight accounting on every termination signal.
  • Adds a cancellation regression test.
File summaries
File Description
DividePlugin.java Uses doFinally for P2C response accounting.
DividePluginTest.java Verifies inflight decrement after cancellation.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@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). Small, well-scoped fix with regression tests; green CI, mergeable. Reviewed the diff.

@Aias00
Aias00 merged commit 39250e1 into apache:master Sep 30, 2026
23 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] p2c inflight counter leaks on downstream cancellation (no doOnCancel/doFinally)

4 participants