fix(notification_router): handle partial failures in batch_load_and_notify#77
Closed
bodymindarts wants to merge 1 commit intomainfrom
Closed
fix(notification_router): handle partial failures in batch_load_and_notify#77bodymindarts wants to merge 1 commit intomainfrom
bodymindarts wants to merge 1 commit intomainfrom
Conversation
…otify When repo.find_all() fails for the entire batch, all waiters in that batch are stalled even for jobs unrelated to the failure. Fall back to individual find_by_id() calls so a failure for one job does not block notifications for the rest. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
Closing per review — the find_all fallback adds unnecessary complexity for a case that shouldn't happen in practice. |
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.
Summary
repo.find_all()fails for an entire batch, fall back to individualfind_by_id()calls so a failure for one job does not block notifications for the restAddresses Bugbot observation 2 from #76.
Test plan
find_allstill used as fast path)find_allencounters a transient DB error, individual loads proceed and unrelated waiters are notified🤖 Generated with Claude Code
Note
Medium Risk
Changes notification delivery behavior in the terminal-state path; a
find_allfailure now triggers N individual DB reads, which could affect load/latency and retry semantics under DB errors.Overview
Ensures terminal job notifications aren’t blocked when the batched
repo.find_all()call fails inbatch_load_and_notify.On batch failure, it now logs the fallback and attempts
load_and_notifyper job ID, allowing unaffected jobs’ waiters to be notified immediately instead of waiting for the next sweep.Written by Cursor Bugbot for commit a7f9288. This will update automatically on new commits. Configure here.