-
Notifications
You must be signed in to change notification settings - Fork 148
perf: parallelize suspension handler for high-concurrency #544
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
perf: parallelize suspension handler for high-concurrency #544
Conversation
🦋 Changeset detectedLatest commit: 886548c The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (11 failed)mongodb (1 failed):
redis (1 failed):
starter (8 failed):
turso (1 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
61edd56 to
bdefce0
Compare
c4a92e0 to
4d36770
Compare
- Process hooks first, then steps and waits in parallel to prevent race conditions - Refactor runtime.ts into modular files: suspension-handler.ts, step-handler.ts, helpers.ts - Add otel attributes for hooks created (workflow.hooks.created) and waits created (workflow.waits.created) - Update suspension status from pending_steps to workflow_suspended - Add retry logic to benchmark for unexpected content type errors - Refactor stress test benchmarks to use shared config (10, 25 steps enabled; 100+ skipped) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
99078d0 to
886548c
Compare

The current implementation of suspension handler processes the invocation queue sequentially which is really slow. Now we process is in parallel:
suspension-handler.ts,step-handler.ts,helpers.tsworkflow.hooks.created) and waits created (workflow.waits.created)pending_stepstoworkflow_suspended