Skip to content

feat(processor): add gap detection for block processing#76

Merged
Savid merged 1 commit intomasterfrom
feat/gap-detection
Feb 3, 2026
Merged

feat(processor): add gap detection for block processing#76
Savid merged 1 commit intomasterfrom
feat/gap-detection

Conversation

@Savid
Copy link
Member

@Savid Savid commented Feb 3, 2026

Add ClickHouse gap detection to find missing blocks between the oldest
processed block and the current block. This catches gaps that fall
outside the maxPendingBlockRange window.

Changes:

  • Add GetIncompleteBlocksInRange() to state manager for range queries
  • Add GapStateProvider interface extending StateProvider
  • Add GetGaps() method to limiter for full-range gap detection
  • Add GapDetectionConfig with configurable scan interval, batch size,
    and lookback range
  • Add periodic gap scanner goroutine to processor
  • Exclude maxPendingBlockRange window from gap scan to avoid double work

The gap scanner runs periodically (default: 5m) and reprocesses any
incomplete blocks found outside the limiter's normal detection window.

Add ClickHouse gap detection to find missing blocks between the oldest
processed block and the current block. This catches gaps that fall
outside the maxPendingBlockRange window.

Changes:
- Add GetIncompleteBlocksInRange() to state manager for range queries
- Add GapStateProvider interface extending StateProvider
- Add GetGaps() method to limiter for full-range gap detection
- Add GapDetectionConfig with configurable scan interval, batch size,
  and lookback range
- Add periodic gap scanner goroutine to processor
- Exclude maxPendingBlockRange window from gap scan to avoid double work

The gap scanner runs periodically (default: 5m) and reprocesses any
incomplete blocks found outside the limiter's normal detection window.
@Savid Savid force-pushed the feat/gap-detection branch from 3413d52 to 0592bc1 Compare February 3, 2026 04:02
@Savid Savid merged commit 052af57 into master Feb 3, 2026
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

Development

Successfully merging this pull request may close these issues.

2 participants