Skip to content

Fix dynamic cache resize race in 26.1+ - #103702

Merged
kssenii merged 6 commits into
masterfrom
filecache-resize-fix
May 9, 2026
Merged

kssenii merged 6 commits into
masterfrom
filecache-resize-fix

Conversation

@kssenii

@kssenii kssenii commented Apr 29, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix dynamic cache resize race in 26.1+.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.5.1.475 (included in 26.5 and later)
  • Backported to: 26.3.18.21

@clickhouse-gh

clickhouse-gh Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [6abebb8]

Summary: ❌

job_name test_name status info comment
AST fuzzer (amd_msan) FAIL
Logical error: AggregateFunctionArray: parameters mismatch between Array wrapper 'A' and nested function 'B'. Wrapper has C parameter(s): [D], nested function has E parameter(s): [F] (STID: 4870-4f07) FAIL cidb, issue ISSUE CREATED

AI Review

Summary

This PR replaces the cache_is_being_resized atomic flag with a shared_timed_mutex-based synchronization scheme for dynamic filesystem cache resize, and adds dynamic_resize_lock_wait_ms to avoid blocking resize forever. The change is focused, consistent with the intended concurrency model, and I did not find correctness, safety, or compatibility issues in the current diff.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Apr 29, 2026
@antonio2368 antonio2368 self-assigned this May 5, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 91.10% 91.10% +0.00%
Branches 76.60% 76.50% -0.10%

Changed lines: 80.00% (28/35) | lost baseline coverage: 3 line(s) · Uncovered code

Full report · Diff report

@kssenii
kssenii added this pull request to the merge queue May 9, 2026
Merged via the queue into master with commit 0a0bac8 May 9, 2026
164 of 166 checks passed
@kssenii
kssenii deleted the filecache-resize-fix branch May 9, 2026 14:04
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 9, 2026
@kssenii kssenii added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Aug 11, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Aug 11, 2026
robot-clickhouse-ci-1 added a commit that referenced this pull request Aug 11, 2026
Cherry pick #103702 to 26.3: Fix dynamic cache resize race in 26.1+
alexey-milovidov added a commit that referenced this pull request Aug 12, 2026
Backport #103702 to 26.3: Fix dynamic cache resize race in 26.1+
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v26.2-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants