Repository navigation
Use one source instead of N for parallel_inserts of AzureQueue/S3Queue - #130864
Conversation
|
Workflow [PR], commit [7a1cc7a] Summary: ❌
AI ReviewSummary
Missing context / blind spots
Findings❌ Blockers
Tests
Final VerdictStatus: ❌ Block. Preserve bucket ownership through the owning insert's commit/reset and add focused regression coverage. The concurrency-alter limitation remains deferred to PR #130904. |
76459c6 to
87dc278
Compare
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 units22 translation units recompiled, 165 s compile time in total, 22 of them have a recent master baseline. |
The initial idea was that with parallel_inserts=1, it will spawn multiple "INSERT SELECT", where each SELECTs should be executed in a single thread. But SELECT was also parallel. The problem was that this setting was never serialized into metadata, while it was used from metadata to determin parallelism of SELECTs So just remove this settings from serialization, there is no point in this anyway, it affects only execution. Fixes: ClickHouse#119018
87dc278 to
7a1cc7a
Compare
5b357bd
|
It broke the CI. |
After ClickHouse#130864, `parallel_inserts=1` runs one streaming task per processing thread. Every successful commit, including commits of empty batches by idle tasks, reset the shared `max_files_override` to 0, undoing the halving done by the task that hit a failing INSERT. The bad file then never ended up alone in a batch, its retry count was never reduced, and good files batched together with it were never processed. Reset the override only after a batch which committed files, and only if no other task changed it since this iteration started. Failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=83b6da0324076eb3a1c8f1ea58fee8c57e24e757&name_0=MasterCI&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%204%2F4%29 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s-override-reset Use one source instead of N for parallel_inserts of AzureQueue/S3Queue (re-land ClickHouse#130864 with a fix)
Edited by the nightly changelog CI job following .claude/skills/edit-changelog/SKILL.md. Changelog-revert: 127836 124816 Revert "Avoid building stream names and substreams cache keys for every block in MergeTreeReaderWide" Changelog-revert: 128706 116083 Revert "Fit the insert pipeline and merges into a small server's memory" Changelog-revert: 128760 128658 Revert "Prewarm macOS code signature verification of the clickhouse binary after linking" Changelog-revert: 128947 127422 Revert "[GPU] `GDeflate` compression codec on the CPU" Changelog-revert: 129099 128947 Revert "Revert "[GPU] `GDeflate` compression codec on the CPU"" Changelog-revert: 129310 127149 Revert "Mark a query as cancelled in the process list when its TCP client cancels it" Changelog-revert: 129311 129310 Revert "Revert "Mark a query as cancelled in the process list when its TCP client cancels it"" Changelog-revert: 129862 129425 Revert "Add 7 tests for coverage gaps in 5 components" Changelog-revert: 129863 129862 Fix `GLOBAL IN` in projection `WHERE` with parallel replicas; restore coverage tests Changelog-revert: 129986 122871 Revert "Search long integer slices in 512-byte chunks on AArch64 in `hasAll` and `hasAny`" Changelog-revert: 130046 129986 Revert "Revert "Search long integer slices in 512-byte chunks on AArch64 in `hasAll` and `hasAny`"" Changelog-revert: 130368 114729 Revert "CI: run the full test suite only when review threads are resolved" Changelog-revert: 130509 130368 Revert "Revert "CI: run the full test suite only when review threads are resolved"" Changelog-revert: 130531 114923 Revert "Make a table read by a scalar subquery in a CONSTRAINT a loading dependency" Changelog-revert: 131043 129464 Revert "Sync shared files changed by the private `AmberMap` PR" Changelog-revert: 131045 130793 Revert "Fix wrong ORDER BY ... LIMIT results on Delta Lake tables with column mapping" Changelog-revert: 131270 128764 Re-enable the adaptive aggregator for queries generated from PromQL Changelog-revert: 131424 122826 Revert "Forbid renaming the source of incremental refreshable views" Changelog-revert: 131562 131454 Revert "Build the symbol index in the background at server startup" Changelog-revert: 131638 131562 Revert "Revert "Build the symbol index in the background at server startup"" Changelog-revert: 131691 130864 Revert "Use one source instead of N for parallel_inserts of AzureQueue/S3Queue" Changelog-revert: 131765 119685 Revert "Enable `-mbranch-protection=pac-ret` on ARM" Changelog-deleted-entry: 116083 [Performance Improvement] [section] * Reduce memory use for `INSERT` and background merges on servers with a few GiB of RAM. Write buffers, insert squashing, the `Parquet` reader and merge selection now scale with `max_server_memory_usage`, avoiding `MEMORY_LIMIT_EXCEEDED` during wide-table inserts and merges that repeatedly fail without reducing the part count. New `MergeTree` settings `max_memory_ratio_to_activate_adaptive_write_buffer` and `merge_memory_estimate_per_source_part_column` control adaptive write buffers and merge selection, respectively; set either to `0` to disable that adjustment. [#116083](#116083) ([Alexey Milovidov](https://github.com/alexey-milovidov)). Changelog-deleted-entry: 119685 [Build/Testing/Packaging Improvement] [raw] * Build the `C` and `C++` code of the ARM binaries with `-mbranch-protection=pac-ret`, which signs the return address so that overwriting it on the stack cannot redirect control flow; the AArch64 `.S` sources that key off `__ARM_FEATURE_PAC_DEFAULT` opt into the same signing. Sanitizer builds are excluded, because the sanitizer runtimes do not strip the signature when they unwind. [#119685](#119685) ([Alexey Milovidov](https://github.com/alexey-milovidov)). Changelog-deleted-entry: 122826 [Bug Fix (user-visible misbehavior in an official stable release)] [raw] * Forbid renaming the source of incremental refreshable views closes #[#120082](#120082). [#122826](#122826) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)). Changelog-deleted-entry: 128658 [NOT FOR CHANGELOG / INSIGNIFICANT] [raw] * Prewarm macOS code signature verification of the clickhouse binary after linking. [#128658](#128658) ([Azat Khuzhin](https://github.com/azat)). Changelog-deleted-entry: 128764 [NOT FOR CHANGELOG / INSIGNIFICANT] [raw] * Disable the adaptive aggregator for queries generated from PromQL. [#128764](#128764) ([Vitaly Baranov](https://github.com/vitlibar)). Changelog-deleted-entry: 129464 [NOT FOR CHANGELOG / INSIGNIFICANT] [raw] * Sync shared files changed by the private `AmberMap` PR. [#129464](#129464) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)). Changelog-deleted-entry: 130793 [Bug Fix (user-visible misbehavior in an official stable release)] [raw] * Fixed wrong results of `ORDER BY ... LIMIT` on a Delta Lake table with column mapping when a renamed column has the name that another column is stored under: the top-K dynamic filter (`use_top_k_dynamic_filtering`) compared the other column against the threshold and dropped rows of the true result. [#130793](#130793) ([Groene AI](https://github.com/groeneai)). Changelog-deleted-entry: 130864 [Bug Fix (user-visible misbehavior in an official stable release)] [raw] * Use one source instead of N for parallel_inserts of AzureQueue/S3Queue. [#130864](#130864) ([Azat Khuzhin](https://github.com/azat)).
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Use one source instead of N for parallel_inserts of AzureQueue/S3Queue
The initial idea was that with parallel_inserts=1, it will spawn multiple "INSERT SELECT", where each SELECTs should be executed in a single thread. But SELECT was also parallel.
The problem was that this setting was never serialized into metadata, while it was used from metadata to determin parallelism of SELECTs
So just remove this settings from serialization, there is no point in this anyway, it affects only execution.
Fixes: #119018
Workflow [PR]
Sync PR [sync-upstream/pr/130864]
Version info
26.11.1.2254-master(included in26.11and later)