Altinity / Altinity/clickhouse-regression
Failure: clickhouse-head-x86-with-analyzer-zookeeper/rbac_1/rbac_1 - DB::Exception: Couldn't delete /var/lib/clickhouse/access/38373166-2d31-6134-6164-373733313063.sql. (FILE_DOESNT_EXIST)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 27
- Forks
- 10
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
Version: 25.11.1.2598
Description
When renaming a user to an existing user name, ALTER USER ... RENAME TO ... correctly returns ACCESS_ENTITY_ALREADY_EXISTS, but the rename is still partially applied internally.
As a result:
user15is renamed touser16even though an exception is thrown.- Two
user16entries appear insystem.users. - Dropping
user16anduser15removes both entries. - Subsequent
CREATE USER OR REPLACE user15fails withFILE_DOESNT_EXISTorACCESS_ENTITY_ALREADY_EXISTS(onCREATE USER user15).
This indicates that the rename operation is modifying internal metadata even after the exception, leading to RBAC corruption.
Steps to reproduce the issue
CREATE USER IF NOT EXISTS user15 IDENTIFIED WITH no_password;
CREATE USER IF NOT EXISTS user16 IDENTIFIED WITH no_password;
-- Check that user15 and user16 were created:
SELECT name, storage, id FROM system.users;
-- Expected error: ACCESS_ENTITY_ALREADY_EXISTS
ALTER USER user15 RENAME TO user16;
-- Problem: even though the previous command raises an exception,
-- user15 is actually renamed and now we have two `user16` entries:
SELECT name, storage, id FROM system.users;
DROP USER IF EXISTS user16;
DROP USER IF EXISTS user15;
-- Both `user16` entries are deleted:
SELECT name, storage, id FROM system.users;
-- This is the failure Code: 107(FILE_DOESNT_EXIST) that is later caught in the regression test :
CREATE USER OR REPLACE user15;
Versions tested:
- 25.11.1.2648 - ❌ Failed
- 25.10.2.65 - ✅ Passed
- 25.9.5.21 - ✅ Passed
- 25.8.11.66 - ✅ Passed
Issue on Upstream
CI Run
https://github.com/Altinity/clickhouse-regression/actions/runs/19316216971/job/55247989837
Artifacts and Reports
Artifacts will be uploaded to https://altinity-test-reports.s3.amazonaws.com/index.html#clickhouse/25.11.1.2598/19316216971/testflows/x86_64/with_analyzer/zookeeper/without_thread_fuzzer/rbac1/
Review report at https://altinity-test-reports.s3.amazonaws.com/clickhouse/25.11.1.2598/19316216971/testflows/x86_64/with_analyzer/zookeeper/without_thread_fuzzer/rbac1/report.html
Review new fails (nice) at https://altinity-test-reports.s3.amazonaws.com/clickhouse/25.11.1.2598/19316216971/testflows/x86_64/with_analyzer/zookeeper/without_thread_fuzzer/rbac1/nice-new-fails.log.txt
Failure Description
Received exception from server (version 25.11.1):
Code: 107. DB::Exception: Received from localhost:9000. DB::Exception: Couldn't delete /var/lib/clickhouse/access/38373166-2d31-6134-6164-373733313063.sql. (FILE_DOESNT_EXIST)
(query: CREATE USER OR REPLACE user15 )
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by rerunning the rbac_1 regression scenario and reviewing the linked upstream ClickHouse issue, since no repository file or test path is named. Compare the ALTER USER failure with the resulting system.users state and the later CREATE USER OR REPLACE error; done means the regression is reproduced, covered by the test, and no RBAC corruption remains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sql
- Domain
- databases, testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100