Repository navigation
Conversation
…ated from PromQL" This reverts commit 4d76414 (ClickHouse#128764), reversing changes made to 8886954. ClickHouse#129565 fixed the staging of the adaptive aggregator that made the grid aggregation of the SQL generated from PromQL slower, so that SQL can use the aggregator again. The conflict in the includes of PrometheusHTTPProtocolAPI.cpp is resolved by keeping `Server/PrometheusMetricsWriter.h`, added later by ClickHouse#125250. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 2 findings; 1 full pass).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261113-111301 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261113-100900 |
|
Workflow [PR], commit [608ae3c] Summary: ✅
AI ReviewSummaryPR #131270 removes the PromQL-specific Missing context / blind spots
Final Verdict✅ Approve — no code changes requested. Pending CI should complete before merge. |
…or override Restore the helper that ClickHouse#128764 introduced and its two call sites (the prometheusQuery* table functions and the Prometheus HTTP API), and remove only the part of it that disabled the adaptive aggregator, as asked in review. The helper keeps setting `enable_materialized_cte` and `empty_result_for_aggregation_by_empty_set` for the generated SQL. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Slowest function optimization changes (ThinLTO)Median per-function time ratio to the master baseline:
Compile time of recompiled translation units7 translation units recompiled, 9 s compile time in total, 7 of them have a recent master baseline. |
PromQL Compliance ReportBaseline: S3 master
Extended support (upstream engine tests): native-histogram exclusions: 149; excluded assertions: 248; upstream Note: Prometheus compliance score is unchanged vs baseline. |
Reverts #128764
Related: #129565
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
Re-enables the adaptive aggregator for the SQL generated from PromQL, as requested in #128764 (comment). #128764 turned it off as a workaround for the aggregator's staging regression on PromQL grid aggregations, which #129565 fixed. Only the
enable_adaptive_aggregatoroverride is removed:StoragePrometheusQuery::applySettingsForPrometheusQueryand its two call sites (theprometheusQuery*table functions and the Prometheus HTTP API) stay.On the
amd_releasebuild of414302af(the merge of #129565, still with #128764),SETTINGS enable_adaptive_aggregator = 1, which is what PromQL runs with after this change, vs= 0takes 0.86..1.13x the time at 0.70..1.03x the peak memory for the six queries of the #128764 benchmark, on its three datasets, both samples tables and 4/16/64 threads, with the same results (sum by (job) (rate(m[5m]))up to float summation order).On a debug build of this branch,
system.query_logshows the aggregator's events (AdaptiveAggregationLocalFreezesand the others) for bothprometheusQueryRangeand/api/v1/query_rangewith no setting,SETTINGS enable_adaptive_aggregator = 0still turns it off, and the results are unchanged. #128764 is in no release.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131270]
Version info
26.11.1.2261-master(included in26.11and later)