Skip to content

docs: indexer outage and gap recovery (fixes #580)#583

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Hollujay:docs/580-indexer-reorg-rpc-outage-handling
Jul 19, 2026
Merged

docs: indexer outage and gap recovery (fixes #580)#583
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Hollujay:docs/580-indexer-reorg-rpc-outage-handling

Conversation

@Hollujay

@Hollujay Hollujay commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds comprehensive documentation for how the indexer handles Stellar RPC outages, ledger gaps, and recovery procedures.

Changes

New file: docs/indexer/RECOVERY.md — covers all four acceptance criteria:

  1. RPC outage behaviour — documents that polling pauses when the RPC node is unreachable, no events are missed (with typical ~48h RPC retention), the heartbeat degrades to HTTP 503 after the stale threshold, and cursor staleness warnings fire at the configured interval.

  2. Ledger gap detection — explains detectLedgerGap() in ledger-gap-detection.service.ts, which compares the last processed ledger against the Stellar network head and emits a structured warning when the gap exceeds 10 ledgers (~50s). Notes the current // TODO for wiring a real RPC call in production.

  3. Manual replay process — step-by-step for POST /api/v1/admin/indexer/replay:

    • Request validation (startLedger, endLedger, dryRun)
    • Background job lock acquisition (returns 409 on concurrent replay)
    • Audit event emission
    • Full write path (activity, ownership, price snapshots, cursor advancement)
    • Dry-run mode for safe validation
  4. Consequences of an unreplayed gap — table detailing permanent inaccuracies in price snapshots, ownership balances, activity feed, and webhook delivery if a gap is not replayed.

Modified: docs/indexer/ARCHITECTURE.md — added cross-reference to the new RECOVERY.md in the "Reliability layers" section.

Closes #580

Documents indexer behavior during RPC outages, ledger gap detection,
manual replay process, and consequences of unreplayed gaps.

Closes accesslayerorg#580
@Chucks1093
Chucks1093 merged commit 289259e into accesslayerorg:main Jul 19, 2026
1 check 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

Development

Successfully merging this pull request may close these issues.

Add docs for how the indexer handles reorgs or missed ledgers during RPC outages

2 participants