Skip to content

fix(http): clean up rejected stream reactor state - #236

Merged
MisterVVP merged 4 commits into
dev-optimize-streaming-response-latenciesfrom
dev-recover-subscription-throughput-scaling
Sep 1, 2026
Merged

MisterVVP merged 4 commits into
dev-optimize-streaming-response-latenciesfrom
dev-recover-subscription-throughput-scaling

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Sep 1, 2026 •

Copy link
Copy Markdown
Owner

Motivation

A concurrent StartStreamRequest() / Shutdown() race could create async stream state and a reactor, then reject registration after shutdown had already won. In that path, retained transfer lifetime state and completion callbacks could keep reactor-related objects alive longer than intended.

The previous callback-worker scaling experiment did not demonstrate a reliable HTTP/JSON-RPC throughput benefit, so that change has been reverted.

Changes

  • Clear the rejected transfer's retained lifetime state and completion callback when shutdown wins before stream registration.
  • Restore the shared stream dispatch executor to its original bounded four-worker configuration.
  • Replace the flaky process-wide thread-count shutdown assertion with deterministic libcurl reactor lifecycle counters.
  • Verify that concurrent stream starts cannot create or leak a replacement reactor after shutdown wins.
  • Keep future stream starts rejected after shutdown.

@MisterVVP MisterVVP added the codex Automatic label added by codex agent. Should not be used label Sep 1, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP self-assigned this Sep 1, 2026
@MisterVVP MisterVVP added AI agent AI agent contribution performance Performance improvement related tasks based on benchmark results. Performance tests changes. and removed codex Automatic label added by codex agent. Should not be used labels Sep 1, 2026
@MisterVVP MisterVVP changed the title perf(http): scale stream callback dispatch workers fix(http): clean up rejected stream reactor state Sep 1, 2026
@MisterVVP
MisterVVP merged commit 0f1503a into dev-optimize-streaming-response-latencies Sep 1, 2026
17 checks passed
@MisterVVP
MisterVVP deleted the dev-recover-subscription-throughput-scaling branch September 1, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI agent AI agent contribution performance Performance improvement related tasks based on benchmark results. Performance tests changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant