-
-
Notifications
You must be signed in to change notification settings - Fork 387
feat(proxy): disable memory-heavy features under high-concurrency mode #1441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -570,6 +570,10 @@ export function createReplaySpoolIfOwner( | |||||||||||||||
| delivery: ReplayDelivery = "stream", | ||||||||||||||||
| options: ReplaySpoolOptions = {} | ||||||||||||||||
| ): ReplaySpool | null { | ||||||||||||||||
| if (typeof session.shouldUseRequestReplay === "function" && !session.shouldUseRequestReplay()) { | ||||||||||||||||
| return null; | ||||||||||||||||
| } | ||||||||||||||||
|
Comment on lines
+573
to
+575
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win 在禁用分支中释放已有的 Replay owner。 如果 请在返回前调用 建议修改 if (typeof session.shouldUseRequestReplay === "function" && !session.shouldUseRequestReplay()) {
+ releaseReplayOwnership(session);
return null;
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
|
|
||||||||||||||||
| const replayState = session.replayState; | ||||||||||||||||
| if (replayState?.role !== "owner") return null; | ||||||||||||||||
| const declineOwnership = (): null => { | ||||||||||||||||
|
|
||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warning enumerates the features disabled by high-concurrency mode but omits configured request filters and the Response Fixer. The new
shouldApplyContentTransforms()checks also short-circuit global, provider-specific, and final-phase request filters and bypassResponseFixer.process(), so an operator relying on filters to rewrite required headers/body fields or on the separately enabled fixer can turn this mode on based on the displayed warning and unexpectedly send incompatible payloads upstream or downstream. Include these functional changes in both the description and warning, or do not couple them to this mode.Useful? React with 👍 / 👎.