Skip to content

Comments

feat: compaction observability metrics + tests#565

Merged
ethe merged 2 commits intofeat/compaction-backpressure-cascadefrom
feat/compaction-observability-tests
Feb 3, 2026
Merged

feat: compaction observability metrics + tests#565
ethe merged 2 commits intofeat/compaction-backpressure-cascadefrom
feat/compaction-observability-tests

Conversation

@belveryin
Copy link
Collaborator

Summary

  • Add internal compaction metrics/log hooks for job stats, CAS retries/aborts, trigger ticks, queue drops, cascades, and backpressure
  • Record job success/abort details without blocking hot paths; metrics remain optional and async-safe
  • Add tests for event-driven triggers, cascade budget/cooldown, overlap-heavy inputs, size-cap splitting, CAS retry/cleanup, and missing-stats handling

Metrics Semantics

  • bytes_*, rows_*, tombstones_* only aggregate when input/output stats are complete; snapshots expose per-job complete flags
  • Job aborts still update last_job, job_failures, and CAS retry/abort counters
  • Logging is opt-in via CompactionMetrics::with_job_logging(); otherwise no job logs are emitted

Tests

  • cargo +nightly fmt --all
  • cargo test
  • cargo clippy -- -D warnings

@belveryin
Copy link
Collaborator Author

3/3 of #545

@belveryin belveryin changed the base branch from dev to feat/compaction-backpressure-cascade January 7, 2026 10:04
@belveryin belveryin requested a review from ethe January 7, 2026 10:05
@ethe
Copy link
Member

ethe commented Feb 3, 2026

This PR looks solid!

@ethe ethe merged commit 9ef6d8a into feat/compaction-backpressure-cascade Feb 3, 2026
@ethe ethe deleted the feat/compaction-observability-tests branch February 3, 2026 12:42
ethe pushed a commit that referenced this pull request Feb 4, 2026
…uling (#564)

* feat: add event-driven compaction config

* feat: add compaction backpressure and cascade controls

* fix: avoid moved result in compaction drain

* feat: compaction observability + tests (#565)

* fix: harden l0 backpressure and clarify queue capacity
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