Add memory Metric for Projections PK keys#102587
Conversation
|
Workflow [PR], commit [99a5aa8] Summary: ✅ AI ReviewSummaryThis PR extends ClickHouse Rules
Final Verdict
|
|
btw do we already count marks and index granularity from projection parts? |
alexey-milovidov
left a comment
There was a problem hiding this comment.
Do not merge before fixing "Logical error: '!res.empty()' (STID: 2508-3ea0)"
@tavplubix From what I understood, MarkCache memory usage metric is current metric, and is automatically incremented when marks file for any part(including projection parts) is loaded, because the increment of the loaded bytes happens with in the Cache Class during the load. IndexGranularity, and PK metrics are asynchronous metrics and they are calculated separately for each interval i.e "asynchronous_metrics_update_period_s " and these metrics for projections were missed. This PR calculates PK and index granularity for projections in separate metrics. |
LLVM Coverage Report
Changed lines: 100.00% (22/22) · Uncovered code |
| return int(node.query(query_proj_ig_bytes_allocated).strip()) | ||
|
|
||
| # metrics should increase after first insert | ||
| proj_pk_bytes_before, proj_pk_bytes_after = query_until_condition( |
There was a problem hiding this comment.
Instead of this we can use SYSTEM RELOAD ASYNCHRONOUS METRICS
|
Also make sense to add |
Has been fixed already, likely #102604 |
af89ac9
@azat Thanks for the review. I will work on adding these |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Metrics to Track memory used by Projections Primary Keys and Projections Index Granularity for all tables.
Documentation entry for user-facing changes