Skip to content

fix: add MarkCacheBytes to SystemMetrics query mapping#23677

Draft
Victor-Davidescu wants to merge 1 commit into
DataDog:masterfrom
Victor-Davidescu:fix/clickhouse-mark-cache-bytes-metric-mapping
Draft

fix: add MarkCacheBytes to SystemMetrics query mapping#23677
Victor-Davidescu wants to merge 1 commit into
DataDog:masterfrom
Victor-Davidescu:fix/clickhouse-mark-cache-bytes-metric-mapping

Conversation

@Victor-Davidescu
Copy link
Copy Markdown

What does this PR do?

Adds MarkCacheBytes to the SystemMetrics query mapping so that the clickhouse.table.mergetree.storage.mark.cache metric is collected for users running ClickHouse 25.x+.

The existing entry in SystemAsynchronousMetrics is kept for backwards compatibility with older ClickHouse versions. Only one table will ever contain the metric, so there's no risk of double-reporting.

Motivation

ClickHouse PR #81023 (merged June 2025) moved MarkCacheBytes from system.asynchronous_metrics to system.metrics. As a result, the clickhouse.table.mergetree.storage.mark.cache metric is no longer collected for users running ClickHouse 25.x+.

Verified against ClickHouse 25.12.3.21:

  • SELECT metric FROM system.asynchronous_metrics WHERE metric = 'MarkCacheBytes' → 0 rows
  • SELECT metric FROM system.metrics WHERE metric = 'MarkCacheBytes' → 1 row

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.11%. Comparing base (4613486) to head (050d606).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Victor-Davidescu Victor-Davidescu force-pushed the fix/clickhouse-mark-cache-bytes-metric-mapping branch 2 times, most recently from ba5a561 to 46b9619 Compare May 12, 2026 14:58
@Victor-Davidescu Victor-Davidescu force-pushed the fix/clickhouse-mark-cache-bytes-metric-mapping branch from 46b9619 to 050d606 Compare May 12, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant