Skip to content

Make 04498_query_condition_cache_local_files non-parallel - #110763

Merged
alexey-milovidov merged 1 commit into
masterfrom
fix-04498-qcc-local-files-flaky
Jul 18, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
fix-04498-qcc-local-files-flaky

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

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

The new test 04498_query_condition_cache_local_files (added in #109247) is flaky in parallel test runs: an expected QueryConditionCacheHits occasionally comes back as 0 (result differs with reference), while reruns of the test alone always pass. It failed three times on 2026-07-16 across two unrelated PRs (#110433, #110630), e.g. this report.

Root cause, confirmed from the server log and metric_log of that failed run: dropping or renaming any UUID-less (path-keyed, e.g. Ordinary-database) MergeTree table calls Context::clearCaches, which clears the instance-wide query condition cache along with the other path-keyed caches. CurrentMetric_QueryConditionCacheEntries dropped from 331 to 1 exactly between the test's cache-populating query and the query expected to hit the cache, with no SYSTEM DROP QUERY CONDITION CACHE anywhere in the log. A parallel sibling test can therefore turn any expected cache hit into a miss.

This is the same reason all other tests asserting query condition cache hits (03229_query_condition_cache_*, 04275_104781_qcc_prewhere_skip_index_attribution, 02346_text_index_bug108519_qcc_skip_index) are tagged no-parallel. Tag this test the same way and update its header comment accordingly. Miss assertions are unaffected (a sibling clear cannot cause a spurious hit), so the tag is the only change needed.

Related: #109247

Version info

  • Merged into: 26.7.1.1130 (included in 26.7 and later)

The test asserts `QueryConditionCacheHits` on the instance-wide query
condition cache. A parallel sibling test that drops or renames any
UUID-less (path-keyed) `MergeTree` table calls `Context::clearCaches`,
which wipes the query condition cache, so an expected cache hit turns
into a miss and the test output differs from the reference.

Confirmed from a failed CI run: `CurrentMetric_QueryConditionCacheEntries`
dropped from 331 to 1 exactly between the test's cache-populating query
and the query expected to hit the cache, with no
`SYSTEM DROP QUERY CONDITION CACHE` in the server log.

All other tests asserting query condition cache hits are already tagged
no-parallel for the same reason.

Failures:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110433&sha=62da4c8be297d0ee37833fc6d0af32868f4bbc9f&name_0=PR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%29
#110433
#110630

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [0f7d547]

Summary: ✅


AI Review

Summary

This PR moves tests/queries/0_stateless/04498_query_condition_cache_local_files.sh to the no-parallel lane and updates the header comment to document why the test cannot safely assert QueryConditionCacheHits while sibling tests can clear the instance-wide query condition cache. I did not find a remaining correctness or review-process issue in the current diff: the tag matches the demonstrated flake mechanism, the CI Fix or Improvement category is appropriate, and the current PR CI report is green.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jul 17, 2026
@alexey-milovidov alexey-milovidov self-assigned this Jul 18, 2026
@alexey-milovidov
alexey-milovidov merged commit 86e9549 into master Jul 18, 2026
349 of 352 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-04498-qcc-local-files-flaky branch July 18, 2026 00:41
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 18, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…cal-files-flaky

Make `04498_query_condition_cache_local_files` non-parallel
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