perf: optimize step boundary cancellation check#41
Conversation
Check controller.signal.aborted before falling back to the DB query at step boundaries. This skips the storage.getRun() call when cancellation was already detected via the run:cancel event listener. Also adds a signal check before replaying cached steps, making cancellation more responsive during resume of jobs with many completed steps. Fixes #38 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
controller.signal.aborted(in-memory) beforestorage.getRun()(DB query) at step boundariesrun:cancelevent, the DB query is skipped entirelyChanges
packages/durably/src/context.ts: Add fast-path signal checks before DB queriesTest plan
pnpm --filter durably test:nodepasses (186 tests)Fixes #38
🤖 Generated with Claude Code