Skip to content

Revert "Revert "Fix a hang in the parallel Parquet encoder when it cannot start an extra thread"" - #113170

Merged
PedroTadim merged 3 commits into
masterfrom
revert-113155-revert-112959-fix/parquet-parallel-encoder-cancel-hang
Aug 4, 2026
Merged

PedroTadim merged 3 commits into
masterfrom
revert-113155-revert-112959-fix/parquet-parallel-encoder-cancel-hang

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

Reverts #113155

@PedroTadim, please commit your fix here.

Version info

  • Merged into: 26.8.1.755 (included in 26.8 and later)

@clickhouse-gh

clickhouse-gh Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [13de640]

Summary: ❌

job_name test_name status info comment
Stress test (amd_msan) FAIL
Logical error: ColumnBLOB should be converted to a regular column before usage (STID: 3059-3663) FAIL cidb, issue
Stress test (arm_release) FAIL
Logical error: ColumnBLOB should be converted to a regular column before usage (STID: 3059-3663) FAIL cidb, issue
AST fuzzer (amd_tsan) FAIL
Logical error: Reading from materialized CTE 'A' before its materialization completed - DelayedPortsProcessor gate is missing in the query plan (STID: 2467-2c2d) FAIL cidb

AI Review

Summary

This PR restores the missing threads_running increment after a successful extra trySchedule in ParquetBlockOutputFormat, which matches the deadlock analysis for the parallel Parquet encoder. I am at ⚠️ Request changes because the fix now lands without any focused reproducer for the starvation path it is supposed to close.

Tests
  • ⚠️ The tree no longer has a targeted regression for the trySchedule starvation path in ParquetBlockOutputFormat::startMoreThreadsIfNeeded. The existing Parquet tests exercise successful parallel encoding, but not the sequence "successful extra worker -> later zero-wait trySchedule failure while queued work remains" that made threads_running go stale. Please add the smallest deterministic test that forces that path, for example a unit test around ParquetBlockOutputFormat with max_threads = 2 and a controlled scheduling or fault-injection failure.
Final Verdict
  • Status: ⚠️ Request changes
  • Minimum required action: add a focused regression test that proves the repaired threads_running invariant survives a failed extra trySchedule.

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.50% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.70% 78.70% +0.00%

Changed lines: Changed C/C++ lines covered: 3/3 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Aug 3, 2026
@PedroTadim PedroTadim self-assigned this Aug 3, 2026
@PedroTadim

Copy link
Copy Markdown
Member

Tomorrow I check this

@PedroTadim

Copy link
Copy Markdown
Member

@alexey-milovidov, the fix is just one line change. I am removing the test because it could become flaky in the future.

@PedroTadim
PedroTadim enabled auto-merge August 4, 2026 07:59
@PedroTadim
PedroTadim added this pull request to the merge queue Aug 4, 2026
Merged via the queue into master with commit a81fa99 Aug 4, 2026
177 of 181 checks passed
@PedroTadim
PedroTadim deleted the revert-113155-revert-112959-fix/parquet-parallel-encoder-cancel-hang branch August 4, 2026 12:28
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants