Skip to content

Conversation

@Savid
Copy link
Member

@Savid Savid commented Feb 3, 2026

Previously gap detection only found incomplete blocks (rows where complete=0), missing truly missing blocks (rows that were never inserted). This change:

  • Add GetMissingBlocksInRange() to state manager using ClickHouse numbers()
  • Update GapStateProvider interface and GetGaps() to return GapResult with both Incomplete and Missing block lists plus scan duration
  • Make processBlock public (ProcessBlock) in all processors for gap filling
  • Add ProcessBlock to BlockProcessor interface
  • Add Prometheus metrics: GapsDetected, GapsReprocessed, GapScanDuration, GapsFound
  • Update checkGaps() to handle both types: ReprocessBlock for incomplete, ProcessBlock for missing blocks
  • Add comprehensive tests for both gap types

… incomplete blocks

Previously gap detection only found incomplete blocks (rows where complete=0),
missing truly missing blocks (rows that were never inserted). This change:

- Add GetMissingBlocksInRange() to state manager using ClickHouse numbers()
- Update GapStateProvider interface and GetGaps() to return GapResult with
  both Incomplete and Missing block lists plus scan duration
- Make processBlock public (ProcessBlock) in all processors for gap filling
- Add ProcessBlock to BlockProcessor interface
- Add Prometheus metrics: GapsDetected, GapsReprocessed, GapScanDuration, GapsFound
- Update checkGaps() to handle both types: ReprocessBlock for incomplete,
  ProcessBlock for missing blocks
- Add comprehensive tests for both gap types
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