Skip to content

tests: use separate filesystem cache for tests that rely on system.filesystem_cache#93036

Merged
azat merged 1 commit intoClickHouse:masterfrom
azat:separate-fs-cache-for-each-test
Jan 5, 2026
Merged

tests: use separate filesystem cache for tests that rely on system.filesystem_cache#93036
azat merged 1 commit intoClickHouse:masterfrom
azat:separate-fs-cache-for-each-test

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Dec 24, 2025

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Fixes: #75876

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Dec 24, 2025

Workflow [PR], commit [df6ac46]

Summary:

job_name test_name status info comment
Stateless tests (amd_msan, parallel) failure
03742_nested_loop_join_long FAIL

Using disk: s3_disk
0
Expect cache
DOWNLOADED 0 0 1
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kssenii Do you have any idea what was this entry of size 1?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No

@clickhouse-gh clickhouse-gh bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Dec 24, 2025
@azat azat marked this pull request as draft December 24, 2025 23:12
@azat azat added the 🍃 green ci 🌿 Fixing flaky tests in CI label Dec 24, 2025
@azat azat force-pushed the separate-fs-cache-for-each-test branch from 83a2d18 to df6ac46 Compare December 25, 2025 08:25
@azat azat marked this pull request as ready for review December 25, 2025 08:25
@kssenii
Copy link
Copy Markdown
Member

kssenii commented Dec 25, 2025

Are those tests still flaky? This comment confuses me #75876 (comment)

@azat
Copy link
Copy Markdown
Member Author

azat commented Dec 25, 2025

Are those tests still flaky? This comment confuses me #75876 (comment)

I don't see any problems right now, but it still looks like worth to use separate caches, less contention for DROP CACHES, and later it can gain the benefit of filtering by cache_name in system.filesystem_cache

@kssenii
Copy link
Copy Markdown
Member

kssenii commented Dec 29, 2025

I am reluctant to use separate caches, because I remember clearly that as those tests reuse the same cache, it used to find many bugs in cache, because query to system.filesystem_cache triggered assertCacheCorrectness being called, which is only called on drop filesystem cache and read from system.filesystem_cache (calling it in other places can slow down tests too much)

@kssenii
Copy link
Copy Markdown
Member

kssenii commented Dec 29, 2025

(calling it in other places can slow down tests too much)

Though calling it with randomization in more hot places could solve it as well.

@azat
Copy link
Copy Markdown
Member Author

azat commented Dec 29, 2025

Better to do this explicitly I think, maybe just add drop filesystem cache after each test? Or not after each (to catch more possible issues) but after X tests (where X some random value)

@azat azat enabled auto-merge January 5, 2026 15:08
@azat azat added this pull request to the merge queue Jan 5, 2026
Merged via the queue into ClickHouse:master with commit b56c79c Jan 5, 2026
129 of 131 checks passed
@azat azat deleted the separate-fs-cache-for-each-test branch January 5, 2026 15:21
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍃 green ci 🌿 Fixing flaky tests in CI 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.

filesystem cache tests are flaky

3 participants