Don't throw errors when we shut down the loadbalancer watcher#2757
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughPoll loop now accepts a shutdown predicate and conditionally suppresses interrupt-related exceptions and tracer spans; create-process supplies and sets a shutdown flag so the polling loop can terminate cleanly during shutdown. ChangesInterrupt Signal Handling in SQS Polling
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@server/src/instant/loadbalancer.clj`:
- Around line 112-117: In poll-queue's inner (catch Throwable t) block, don’t
swallow interruption-related exceptions by returning :backoff; instead detect if
t is an InterruptedException or an AbortedException whose cause is an
InterruptedException and rethrow t so the outer InterruptedException handler can
terminate the loop. For non-interruption errors, keep calling
tracer/record-exception-span! and return :backoff as before; reference the catch
handling around poll-queue, the InterruptedException and AbortedException
checks, and tracer/record-exception-span! when making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 79155b42-5722-4c6b-b3cd-f80ff32525e0
📒 Files selected for processing (1)
server/src/instant/loadbalancer.clj
This catches the interrupted exceptions that get thrown when we stop the loadbalancer watcher.
Should makes deploys a little less noisy.