Skip to content

Attempt to fix 02441_alter_delete_and_drop_column - #89947

Merged
fm4v merged 1 commit into
masterfrom
abakharew/try-to-fix-02441-flaky-test
Nov 13, 2025
Merged

fm4v merged 1 commit into
masterfrom
abakharew/try-to-fix-02441-flaky-test

Conversation

@alexbakharew

@alexbakharew alexbakharew commented Nov 12, 2025 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

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

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Details

Try to fix #81948

@CLAassistant

CLAassistant commented Nov 12, 2025 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@clickhouse-gh

clickhouse-gh Bot commented Nov 12, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a2eaa04]

Summary: ❌

job_name test_name status info comment
PR formatter failure
check output failure cidb

@clickhouse-gh clickhouse-gh Bot added pr-build Pull request with build/testing/packaging improvement pr-not-for-changelog This PR should not be mentioned in the changelog and removed pr-build Pull request with build/testing/packaging improvement labels Nov 12, 2025
@tuanpach tuanpach self-assigned this Nov 13, 2025
@tuanpach

Copy link
Copy Markdown
Member

@alexbakharew
I think you should create the PR with the ClickHouse email.

This PR should be CI fix.
Can you explain the reason for the test flakiness?
Could you make the commit message more descriptive?

@alexbakharew

Copy link
Copy Markdown
Contributor Author

Hi @tuanpach
I am trying to fix this flaky test and I don't know the exact reason yet. My first guess which I want to prove is to disable merge job before actual insertion. I believe that this could be the source of flakiness.

Also I wanted to see how CI do flakiness check. The PR is not yet ready, should be marked as draft

@alexbakharew
alexbakharew marked this pull request as draft November 13, 2025 10:27
@alexbakharew
alexbakharew force-pushed the abakharew/try-to-fix-02441-flaky-test branch from 64821d0 to a2eaa04 Compare November 13, 2025 12:33
@clickhouse-gh clickhouse-gh Bot added pr-ci and removed pr-not-for-changelog This PR should not be mentioned in the changelog labels Nov 13, 2025
@alexbakharew
alexbakharew marked this pull request as ready for review November 13, 2025 13:47
@fm4v
fm4v added this pull request to the merge queue Nov 13, 2025
Merged via the queue into master with commit 2d73c1e Nov 13, 2025
@fm4v
fm4v deleted the abakharew/try-to-fix-02441-flaky-test branch November 13, 2025 18:45
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 13, 2025
@tavplubix

tavplubix commented Nov 13, 2025 •

Copy link
Copy Markdown
Member

@fm4v what exactly does it fix and why?

Here's a recent failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=85535&sha=f507e3902f3da3b34ae6f95231be15fe3af5b5f8&name_0=PR&name_1=Fast%20test&name_1=Fast%20test

The difference is refcount = 3 vs 1. The part name is still the same which indicates that it wasn't merge

AFAIR, the merge selecting algorithm in RMT doesn't assign a merge if there are only 2 parts, which is indeed a bad thing to rely on. But I don't understand what is changed by moving the stop merges query, and how it is supposed to help with refcount

@fm4v

fm4v commented Nov 14, 2025

Copy link
Copy Markdown
Member

I've checked the test's history, and it was me who added this query for more debug info. Unfortunately, it made the test flaky, so I'm going to remove it. 🤦

select partition,name,uuid,active,marks,rows,refcount,partition_id from system.parts where database=currentDatabase() and table='mut';

There was also another reason for flakiness when marks=3. This happened because of a very rare cases when randomized index_granularity=1 ("index_granularity": lambda: random.randint(1, 65536),). But i'm going to remove this check anyway.

2025-11-04 21:44:23 -tuple()	all_0_0_0	00000000-0000-0000-0000-000000000000	1	2	2	1	all
2025-11-04 21:44:23 +tuple()	all_0_0_0	00000000-0000-0000-0000-000000000000	1	3	2	1	all

The main problem:

2025-10-09 20:35:09 +ALTER_METADATA		[]

I'm going to add another wait for the ALTER_METADATA disappearance.

List of recent failures

@fm4v

fm4v commented Nov 14, 2025

Copy link
Copy Markdown
Member

#90032

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.

Functional test 02441_alter_delete_and_drop_column is flaky

6 participants