Skip to content

Feat/731 indexer error recovery - #779

Merged
ritaifeoluwa merged 4 commits into
SmartDropLabs:mainfrom
mijinummi:feat/731-indexer-error-recovery
Nov 25, 2026
Merged

ritaifeoluwa merged 4 commits into
SmartDropLabs:mainfrom
mijinummi:feat/731-indexer-error-recovery

Conversation

@mijinummi

Copy link
Copy Markdown
Contributor

closes #729, closes #730, closes #731, closes #732

Summary

Introduces an indexer recovery coordination mechanism to improve backend resilience when indexer polling or processing fails. The implementation establishes checkpoint-based recovery integration, prevents concurrent recovery attempts, and tracks recovery health for observability.

Changes Made

  • Checkpoint recovery coordination: Introduced a recovery coordinator to resume indexer processing from the last saved checkpoint.
  • Concurrency protection: Prevents overlapping recovery attempts through an in-flight recovery lock.
  • Retry cooldown: Added a 30-second cooldown to prevent recovery storms during persistent failures.
  • Recovery observability: Tracks attempts, successes, failures, timestamps, and the most recent recovery error.
  • Recovery diagnostics endpoint: Added GET /indexer/recovery to expose recovery status.
  • Logging: Added structured logs for recovery initiation, completion, and failure.
  • Backward compatibility: Preserved existing indexer status, progress, recipient, and claims endpoints.

Reliability & Safety

  • Recovery failures are caught and logged without crashing the API process.
  • Concurrent errors share the existing recovery operation rather than triggering duplicate attempts.
  • Recovery availability is reported based on runtime support for checkpoint retry.
  • Recovery is designed to resume from persisted checkpoint state rather than arbitrarily restarting indexing.

Validation

  • Recovery success and failure paths.
  • Concurrent recovery attempts.
  • Cooldown enforcement.
  • Runtime recovery-method availability.
  • Existing indexer route compatibility.

Follow-up

Connect retryFromLastCheckpoint() to the actual indexer runtime polling loop in src/indexer/runtime.js, ensuring checkpoint restoration, safe event replay, and polling restart are implemented before considering the issue fully complete.

Commit message:
feat(indexer): add checkpoint recovery on errors

@drips-wave

drips-wave Bot commented Nov 25, 2026

Copy link
Copy Markdown

@mijinummi 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! 🚀

Learn more about application limits

@ritaifeoluwa
ritaifeoluwa merged commit ea2baa8 into SmartDropLabs:main Nov 25, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants