fix(indexer): guard recordQuarantinedEvent so bookkeeping failures don't strand events (#120) - #149
Open
ZacLou wants to merge 1 commit into
Open
fix(indexer): guard recordQuarantinedEvent so bookkeeping failures don't strand events (#120)#149ZacLou wants to merge 1 commit into
ZacLou wants to merge 1 commit into
Conversation
…n't strand events (ourdao#120) - Wraps the failed_events INSERT in its own try/catch inside ingestEventQuarantined. - Logs loudly when the bookkeeping insert itself fails. - The raw events row is already committed, the derived tables were rolled back, and the cursor can still advance past the event. Closes ourdao#120
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.
Closes #120
Wraps the ailed_events INSERT inside ingestEventQuarantined in its own try/catch so a bookkeeping failure (constraint violation, connection reset, disk full) cannot propagate out and strand the whole page.
Adds a regression test that simulates a failing ailed_events insert during quarantine mode and verifies the indexer still completes the page and advances the cursor.
Verification
pm run lint clean
pm run typecheck clean
pm run test not run locally — no local Postgres (same constraint noted in the issue).