Skip to content

Fix flaky test 03221_merge_profile_events#96964

Merged
alexey-milovidov merged 1 commit intomasterfrom
fix-flaky-03221-merge-profile-events
Feb 15, 2026
Merged

Fix flaky test 03221_merge_profile_events#96964
alexey-milovidov merged 1 commit intomasterfrom
fix-flaky-03221-merge-profile-events

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

Remove the ProfileEvents['UserTimeMicroseconds'] > 0 check from all three queries in the test. This counter comes from getrusage which has coarse resolution (typically 1-4 ms on Linux). For small/fast merges (20000 rows), the operation completes so quickly that user time rounds down to zero, causing sporadic failures.

The higher-resolution OSCPUVirtualTimeMicroseconds check (via clock_gettime(CLOCK_THREAD_CPUTIME_ID)) is retained.

Fixes #85891

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):

...

🤖 Generated with Claude Code

Remove the `ProfileEvents['UserTimeMicroseconds'] > 0` check from all
three queries. This counter comes from `getrusage` which has coarse
resolution (typically 1-4 ms on Linux). For small/fast merges (20000
rows), the operation completes so quickly that user time rounds down to
zero, causing sporadic failures.

The higher-resolution `OSCPUVirtualTimeMicroseconds` check (via
`clock_gettime(CLOCK_THREAD_CPUTIME_ID)`) is retained.

#85891

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Feb 15, 2026

Workflow [PR], commit [b53503d]

Summary:

@clickhouse-gh clickhouse-gh bot added the pr-ci label Feb 15, 2026
@alexey-milovidov alexey-milovidov self-assigned this Feb 15, 2026
@alexey-milovidov alexey-milovidov merged commit 4d4ec22 into master Feb 15, 2026
133 of 134 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-flaky-03221-merge-profile-events branch February 15, 2026 14:30
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 15, 2026
zvonand pushed a commit to Altinity/ClickHouse that referenced this pull request Feb 18, 2026
…erge-profile-events

Fix flaky test 03221_merge_profile_events
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.

Stateless test 03221_merge_profile_events is flaky

2 participants