Skip to content

Increase S3 file cache size to fix flaky test - #95103

Merged
alexey-milovidov merged 1 commit into
masterfrom
fix-s3-cache-size
Jan 26, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
fix-s3-cache-size

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Jan 25, 2026 •

Copy link
Copy Markdown
Member

The test 03514_grace_hash_join_logical_error was failing sporadically with NOT_ENOUGH_SPACE error when running with S3 storage configuration. The grace hash join creates temporary files in the file cache, and with 1Gi limit the cache was filling up when running in parallel with other tests.

Increase the cache size from 1Gi to 5Gi.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

See https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=a1b25f3f4beb3ba49aa3b73671cc244185331b86&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29&name_1=Stateless%20tests%20%28amd_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29

Version info

  • Merged into: 26.1.1.855

The test `03514_grace_hash_join_logical_error` was failing sporadically
with `NOT_ENOUGH_SPACE` error when running with S3 storage configuration.
The grace hash join creates temporary files in the file cache, and with
1Gi limit the cache was filling up when running in parallel with other tests.

Increase the cache size from 1Gi to 5Gi.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [bd9f9b6]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jan 25, 2026
@alexey-milovidov alexey-milovidov self-assigned this Jan 26, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jan 26, 2026
Merged via the queue into master with commit 0c7ab16 Jan 26, 2026
130 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-s3-cache-size branch January 26, 2026 00:30
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 26, 2026
huldarchen pushed a commit to huldarchen/ClickHouse that referenced this pull request Oct 11, 2026
On the s3-storage stateless lanes all temporary data goes into cached_s3
(temporary_data_in_cache). The cache has no cache_policy, so it uses the
default SLRU with slru_size_ratio 0.6, and new (temporary) file segments
can only use the probationary share: 40% of max_size, i.e. 2 GiB of 5Gi.
Segments that are being written are not evictable, so every concurrent
spill of a parallel run shares a hard 2 GiB pool while the protected 3 GiB
stays unused for them.

With the ParallelReplicas lane settings 04033_tpc_ds_q04 spills 1.55 GiB
and 04033_tpc_ds_q11 0.71 GiB (failing jobs' query_log); whichever of the
two reserves past 2 GiB first fails with NOT_ENOUGH_SPACE "for temporary
file: reason cannot evict enough space ... Ephemeral hold 2.00 GiB". They
started overlapping when ClickHouse#123790 moved the ParallelReplicas + s3
configuration from amd_llvm_coverage (q04 skipped there) to arm_binary.

10Gi gives a 4 GiB probationary pool; the sum of every test's maximum
spill in the failing jobs is about 3.5 GiB. Same knob as ClickHouse#95103.

Validated with a master build, local MinIO and two configs that differ
only in this file: a 2.45 GiB GROUP BY spill fails 3/3 on 5Gi and passes
3/3 on 10Gi (on 10Gi it fails at exactly 4.00 GiB); q04 + q11 run
together failed 12/20 on 5Gi and passed 20/20 and 100/100 on 10Gi.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci 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.

2 participants