Repository navigation
Make the lazy_columns_replication arrayJoin query measure lazy replication again - #132196
Conversation
…plication again No existing query number or text changes: 1 query is disabled and 1 appended as 2. Since ClickHouse#122240 a non-deterministic function next to `arrayJoin` is evaluated once per output row, so query 0 builds 10240 strings of 1 MiB (3.41 s amd / 2.91 s arm on MasterCI, 16 GiB) and replicates none: with `enable_lazy_columns_replication = 0` it takes the same time. The copy takes the string from a subquery, which is fixed per source row, so `arrayJoin` replicates it again, as query 0 did before ClickHouse#122240. On the official amd builds right before ClickHouse#122240, of its merge and of master, the copy takes 0.002-0.003 s and 3.57-3.69 s (over 1000x) with lazy replication off, the same eager work as the old query 0 (0.997-1.03); query 0 was over 1000x slower without lazy replication before ClickHouse#122240 and takes the same time after. Saves about 40 s of query time per master perf job on amd. Related: ClickHouse#129258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [6a35133] Summary: ✅
AI ReviewSummaryRestores the Final Verdict✅ Approve |
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (1 nit).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261117-015700 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261117-013900 |
c464ce5
Related: #129258
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Query 0 of
lazy_columns_replication.xml,select randomString(1024 * 1024), arrayJoin(range(10240)) format Null, takes 3.41 s on MasterCI amd and 2.91 s on arm, with 16 GiB of memory; before #122240 it took 0.002-0.003 s. Since #122240 a non-deterministic function next toarrayJoinis evaluated once per output row, so the query builds 10240 strings of 1 MiB and replicates none: withenable_lazy_columns_replication = 0it takes the same time.No existing query number or text changes: 1 query is disabled and 1 appended as 2. The copy is the same query with the string from a subquery, which
arrayJoinreplicates 10240 times, as query 0 did before #122240.Validation: on the official amd builds right before #122240, of its merge, and of current master, the copy takes 0.002-0.003 s and over 1000x longer (3.6 s) with
enable_lazy_columns_replication = 0; query 0 was over 1000x slower without it before #122240 and takes the same time without it after.perf.pyon the final file runs only queries 1 and 2, also with CI's--max-queries 10 --soft-max-queries; the copy takes 0.003-0.004 s with 2.9 MB of memory.This saves about 40 s of query time per master perf job on amd. The copy restarts the history of 1 query.
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/132196]
Version info
26.11.1.2625-master(included in26.11and later)