Fix flaky test 02916_another_move_partition_inactive_replica by alexey-milovidov · Pull Request #100924 · ClickHouse/ClickHouse · GitHub
Skip to content

Fix flaky test 02916_another_move_partition_inactive_replica#100924

Merged
nikitamikhaylov merged 11 commits into
masterfrom
fix-02916-flaky-part-names
Mar 31, 2026
Merged

Fix flaky test 02916_another_move_partition_inactive_replica#100924
nikitamikhaylov merged 11 commits into
masterfrom
fix-02916-flaky-part-names

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Mar 27, 2026

Copy link
Copy Markdown
Member

The test checked specific part names after OPTIMIZE TABLE, but the merge selector doesn't guarantee which pairs of parts it picks. With max_parts_to_merge_at_once=2 and 4 input parts, two OPTIMIZE calls always yield exactly 2 active parts, but the specific merge order varies with randomized settings.

Replace the part name check with a count of active parts.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100736&sha=f0e1f4034aebfc4eb9c70f0ead3cad620f5b8199&name_0=PR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20distributed%20plan%2C%20sequential%29
#100736

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)

Version info

  • Merged into: 26.4.1.451

The test checked specific part names after `OPTIMIZE TABLE`, but the
merge selector doesn't guarantee which pairs of parts it picks. With
`max_parts_to_merge_at_once=2` and 4 input parts, two `OPTIMIZE` calls
always yield exactly 2 active parts, but the specific merge order varies
with randomized settings.

Replace the part name check with a count of active parts, which is
deterministic and sufficient for the test's purpose (verifying MOVE
PARTITION with inactive replicas).

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100736&sha=f0e1f4034aebfc4eb9c70f0ead3cad620f5b8199&name_0=PR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20distributed%20plan%2C%20sequential%29

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

clickhouse-gh Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Mar 27, 2026

@alexey-milovidov alexey-milovidov left a comment

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.

The fix is good.

@nikitamikhaylov nikitamikhaylov self-assigned this Mar 31, 2026
@nikitamikhaylov nikitamikhaylov added this pull request to the merge queue Mar 31, 2026
Merged via the queue into master with commit a9b9cbc Mar 31, 2026
156 of 162 checks passed
@nikitamikhaylov nikitamikhaylov deleted the fix-02916-flaky-part-names branch March 31, 2026 14:24
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 31, 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.

3 participants