fix(serve): stop logging InterruptedException as a 500 query error#440
Merged
tinder-maxwellelliott merged 2 commits intoJul 19, 2026
Conversation
Production logs showed "[Error] error computing impacted targets" with a java.lang.InterruptedException stack out of BuildGraphHasher's runBlocking. That interrupt is not an application failure: it comes from stop()'s computeExecutor.shutdownNow() tearing down an in-flight request during JVM shutdown (HttpServer.stop's grace period is shorter than a hash generation), or from a timed-out request's future.cancel(true) leaving a stale interrupt flag on a pooled compute thread that then poisons an unrelated request's first blocking call. - handleQuery now maps InterruptedException to a 503 with a warn-level log instead of the generic 500 + error-level stack trace. - computeWithTimeout clears any leaked interrupt flag before running a task, so a cancelled request that never observed its interrupt (e.g. blocked in `synchronized` on the generation lock) cannot fail the next request served by the same pool thread. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014uD7fwXvjPfYipBf7pnhP5
tinder-maxwellelliott
approved these changes
Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Production logs showed "[Error] error computing impacted targets" with a java.lang.InterruptedException stack out of BuildGraphHasher's runBlocking. That interrupt is not an application failure: it comes from stop()'s computeExecutor.shutdownNow() tearing down an in-flight request during JVM shutdown (HttpServer.stop's grace period is shorter than a hash generation), or from a timed-out request's future.cancel(true) leaving a stale interrupt flag on a pooled compute thread that then poisons an unrelated request's first blocking call.
synchronizedon the generation lock) cannot fail the next request served by the same pool thread.