Skip to content

Fix flaky test 03562_parallel_replicas_remote_with_cluster#99658

Merged
alexey-milovidov merged 3 commits intomasterfrom
fix-03562-parallel-replicas-flaky
Mar 19, 2026
Merged

Fix flaky test 03562_parallel_replicas_remote_with_cluster#99658
alexey-milovidov merged 3 commits intomasterfrom
fix-03562-parallel-replicas-flaky

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

Fixes #89974

The test counted the exact number of query_log entries with ParallelReplicasQueryCount > 0, but this number varies depending on how the profile event gets attributed across the distributed coordinator and shard-level queries. For the one-shard case, the test expected 1 but sometimes gets 2.

Change to a boolean check (countIf(...) > 0) to verify that parallel replicas were used without relying on the exact count.

CI failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=95355&sha=1a2c01f3127165ddfe4f706a59a4e845674fff85&name_0=PR&name_1=Stateless%20tests%20%28arm_asan%2C%20azure%2C%20parallel%29

Changelog category (leave one):

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

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

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

The test counted exact number of query_log entries with
`ParallelReplicasQueryCount > 0`, but the number of entries varies
depending on how the profile event gets attributed across the
distributed coordinator and shard-level queries. Change to a boolean
check (`> 0`) to verify that parallel replicas were used without
relying on the exact count.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=95355&sha=1a2c01f3127165ddfe4f706a59a4e845674fff85&name_0=PR&name_1=Stateless%20tests%20%28arm_asan%2C%20azure%2C%20parallel%29

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Mar 16, 2026

Workflow [PR], commit [b8ad46b]

Summary:


AI Review

Summary

This PR fixes flakiness in 03562_parallel_replicas_remote_with_cluster by replacing exact-count assertions on query_log ParallelReplicasQueryCount entries with boolean presence checks (countIf(...) > 0). The change is narrowly scoped to test logic, aligns with the stated flaky behavior, and avoids relying on non-deterministic log attribution. I did not find blocker- or major-level issues in the patch.

ClickHouse Rules

Item Status Notes
Deletion logging
Serialization versioning
Core-area scrutiny
No test removal
Experimental gate
No magic constants
Backward compatibility
SettingsChangesHistory.cpp
Safe rollout
Compilation time

Final Verdict

  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh bot added the pr-ci label Mar 16, 2026
@alexey-milovidov alexey-milovidov added this pull request to the merge queue Mar 19, 2026
@alexey-milovidov alexey-milovidov self-assigned this Mar 19, 2026
Merged via the queue into master with commit e96c7b4 Mar 19, 2026
163 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-03562-parallel-replicas-flaky branch March 19, 2026 23:58
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 20, 2026
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.

03562_parallel_replicas_remote_with_cluster failed

2 participants