Skip to content

feat(plugin-backfill): report intermediate query metrics during polling#101

Merged
KeKs0r merged 2 commits intomainfrom
marc/query-progress-metrics
Mar 28, 2026
Merged

feat(plugin-backfill): report intermediate query metrics during polling#101
KeKs0r merged 2 commits intomainfrom
marc/query-progress-metrics

Conversation

@KeKs0r
Copy link
Copy Markdown
Contributor

@KeKs0r KeKs0r commented Mar 28, 2026

Summary

  • queryStatus now fetches read_rows, read_bytes, written_rows, written_bytes, and elapsed from system.processes instead of just count(), so running queries return real metrics
  • Added readRows, readBytes, elapsedMs fields to QueryStatus and BackfillChunkState
  • applyQueryStatus detects metric changes (not just state transitions), so onProgress fires on every poll with new data — giving visibility into long-running chunks instead of silence for 20+ minutes

Test plan

  • Unit tests pass (12/12 in async-backfill.test.ts)
  • New test covers intermediate metric reporting across multiple running polls
  • Typecheck and lint pass across all packages
  • E2E backfill tests against live ClickHouse (3 tests timing out on main as well — pre-existing)

🤖 Generated with Claude Code

KeKs0r and others added 2 commits March 28, 2026 20:48
queryStatus now fetches read_rows, written_rows, elapsed etc. from
system.processes instead of just count(). onProgress fires whenever
metrics change, not only on state transitions, giving visibility into
long-running chunks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…query

LIMIT after SETTINGS is a syntax error in ClickHouse distributed queries,
causing queryStatus() to fail on every poll and backfill chunks to be
marked as failed after maxPollErrors consecutive exceptions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KeKs0r KeKs0r merged commit 8112b46 into main Mar 28, 2026
2 checks passed
@KeKs0r KeKs0r deleted the marc/query-progress-metrics branch March 28, 2026 20:25
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.

1 participant