Repository navigation
Fix flaky test 02015_async_inserts_4 - #102019
Conversation
The test creates users and roles with hardcoded global names (u_02015_allowed, u_02015_denied, role_02015). When the flaky check runs this test multiple times with parallel workers, one instance's DROP USER races with another instance's REVOKE/CREATE, causing UNKNOWN_ROLE errors. Fix: suffix user and role names with $CLICKHOUSE_DATABASE (unique per test invocation) so parallel instances operate on independent global objects. Reproduction: --test-runs 10 -j 4 fails 6/10 without fix, 50/50 passes with fix at -j 8. Ref: ClickHouse#101447
Pre-PR Validation Gate (session: cron:clickhouse-ci-task-worker:20260408-034500)a) Deterministic repro? Yes — b) Root cause explained? The test creates users ( c) Fix matches root cause? Yes — suffixing names with d) Test intent preserved? Yes — the test still verifies async insert privilege checking: denied user gets "Not enough privileges", allowed user (via role grant) successfully inserts, data is correct. Only the naming changed. e) Both directions demonstrated?
|
|
cc @alexey-milovidov — could you review this? Per your request on #101447, this makes the test repeatable by suffixing user/role names with $CLICKHOUSE_DATABASE to avoid races when the flaky check runs parallel instances. |
|
Workflow [PR], commit [fadab59] Summary: ✅ AI ReviewSummaryThis PR fixes flakiness in Missing context
ClickHouse Rules
Final Verdict
|
d043209
The test creates users and roles with hardcoded global names (
u_02015_allowed,u_02015_denied,role_02015). When the flaky check runs this test multipletimes with parallel workers, one instance's
DROP USER IF EXISTSraces withanother instance's
REVOKE ALL/CREATE USER, causingUNKNOWN_ROLEerrors.The fix suffixes all user and role names with
$CLICKHOUSE_DATABASE(unique pertest invocation), so parallel instances operate on independent global objects.
Reproduction:
--test-runs 10 -j 4— fails 6/10 without fix, passes 50/50with fix at
--test-runs 50 -j 8.Ref: #101447
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Version info
26.4.1.669