Repository navigation
Conversation
…x 02310 grep Remove the unused CountingTransform::setInsertSource setter since InsertSource is fixed at construction time. Replace the non-deterministic test 04141 (which measured deltas of global system.events counters affected by concurrent queries) with a deterministic test 04538 that reads per-query ProfileEvents from system.query_log isolated by current_database. It checks that DirectInsertedRows/DirectInsertedBytes count only the top-level INSERT, while MaterializedViewInsertedRows/MaterializedViewInsertedBytes count the rows a materialized view writes into its target table, and that the two together add up to InsertedRows/InsertedBytes. Fix 02310_profile_events_insert broken by the new Direct/MaterializedView insert events: the new event names contain 'InsertedRows' as a substring, so the test's grep matched them too. Anchor the match with a word boundary (grep -oP '\bInsertedRows: .*') so only the standalone InsertedRows event matches. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104076&sha=550d496a5a63f6bd77c8fef819c247837f5bb10a&name_0=PR&name_1=Fast%20test
|
@alexey-milovidov Hello! Could you please close #104076 in favor of this PR? |
covered more cases in tests
…nsertion-metrics-mv-clickhouse2
Adapt follow-ups from ClickHouse#104076: - `d1fa10396c4` (2026-08-04, Alexey Milovidov): document that `DirectInsertedRows` and `DirectInsertedBytes` include internal writes through `InterpreterInsertQuery`. - `e0e5528f208` (2026-07-26, Alexey Milovidov): make window-view coverage non-vacuous by asserting that a window view is not an insert dependency, then verify direct-only metric attribution. - `bccfb2938a7` (2026-07-19, Alexey Milovidov): preserve local optional insert-source classification, which already prevents window views from incrementing materialized-view counters.
|
Workflow [PR], commit [41f984c] Summary: ❌
AI ReviewSummaryAdds PR Metadata
Findings💡 Nits
Final VerdictStatus: ✅ Approve. Only the changelog cleanup above is suggested. |
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 units1333 translation units recompiled, 9044 s compile time in total, 1333 of them have a recent master baseline. Median compile-time ratio to the baselines is ×1.05 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. Symbol sizes
|
…nsertion-metrics-mv-clickhouse2
Carry insert-source classification to the relocated CountingTransform sites in InterpreterInsertQuery. Related: ClickHouse#110391
Delete the test and reference for the removed `WINDOW VIEW` feature. Keep direct, materialized-view, and forwarded-insert metric coverage. Related: ClickHouse#110391 Related: ClickHouse#114747 CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=110391&sha=6207933a61c1025ecf1957685683bb96e2fd7fa8&name_0=PR&name_1=Fast%20test
Check inline values with dependent materialized views, table-function destinations, and refreshable APPEND writes without changing pipeline-hop attribution. Related: ClickHouse#104076
The refresh context selects the database of its view, so filter the query log by that database as required by stateless test style checks.
Changelog category:
Changelog entry:
Added metrics
DirectInsertedRows,DirectInsertedBytes,MaterializedViewInsertedRows, andMaterializedViewInsertedBytes....
Documentation entry for user-facing changes:
I think there are none user-facing changes.
At a minimum, the following information should be added (but add more as needed).
Sometimes people need to track table's changes via matirialized view.
I used this to check is materialized view metrics work:
Kinda optional stage:
Checking metrics:
Workflow [PR]
Sync PR [sync-upstream/pr/110391]