Repository navigation
feat(replay): add replayAllUnresolvedFailedEvents with progress logging - #655
Merged
Merged
Conversation
Implements replayAllUnresolvedFailedEvents in src/indexer/replay.ts (issue ourdao#523). The function queries only unresolved rows (resolved_at IS NULL), replays each in its own transaction, and logs periodic progress lines matching reindexFromEventLog's format: [replay] progress: N/total event(s) (pct%) — rate ev/s, elapsed Ns, ETA Ns. Progress fires every 2 s by default; the interval is overridable for tests. Adds a progress-logging test to test/indexer-replay-all.test.ts that passes 0 ms so every event triggers a log line and asserts the [replay] progress: pattern.
defimomof2
requested review from
bbjiggy,
precious-akpan and
stephanieefeakpokrire-droid
as code owners
November 23, 2026 11:14
|
@defimomof2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Implements
replayAllUnresolvedFailedEventsinsrc/indexer/replay.tswith periodic progress logging, addressing the gap identified in issue #523.What changed:
src/indexer/replay.ts: AddedreplayAllUnresolvedFailedEvents(). It queries only unresolved rows (resolved_at IS NULL) fromfailed_events, replays each in its own transaction, and logs a progress line every 2 s (default) in the same formatreindexFromEventLoguses:The interval is an optional parameter so tests can pass
0to force every event to log.test/indexer-replay-all.test.ts: Added a progress-logging test that passes0ms as the interval, capturesconsole.log, and asserts the[replay] progress:pattern is emitted with the expected fields (ev/s,elapsed,ETA).Closes #523
Closes #511
Closes #517
Closes #524