Repository navigation
fix(divide): release p2c inflight on cancellation - #7096
Merged
Aias00 merged 3 commits intoSep 30, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 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
approved these changes
Sep 19, 2026
Aias00
left a comment
Contributor
There was a problem hiding this comment.
Approved as PMC (Aias00). Small, well-scoped fix with regression tests; green CI, mergeable. Reviewed the diff.
eye-gu
pushed a commit
to eye-gu/shenyu
that referenced
this pull request
Sep 30, 2026
Co-authored-by: zhengpeng <[email protected]> Co-authored-by: aias00 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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