Skip to content

Backport #117895 to 26.3: Require the WRITE ON FILE grant when rename_files_after_processing is set - #118546

Merged
antonio2368 merged 4 commits into
26.3from
backport/26.3/117895
Sep 8, 2026
Merged

antonio2368 merged 4 commits into
26.3from
backport/26.3/117895

Conversation

@robot-ch-test-poll2

@robot-ch-test-poll2 robot-ch-test-poll2 commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #117895
Cherry-pick pull-request #118537

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.3.33.8

@robot-ch-test-poll2 robot-ch-test-poll2 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels Sep 7, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [273110a]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_asan, distributed plan, parallel, 1/2) failure
04238_alter_rename_column_merge_race FAIL cidb

PedroTadim and others added 3 commits September 7, 2026 13:17
The `URL` database engine (`src/Databases/DatabaseURL.cpp`) was introduced
after this branch, so `CREATE DATABASE ... ENGINE = URL('file://')` throws
`UNKNOWN_DATABASE_ENGINE` here and the test fails with `having stderror`.
The `url('file://...')` table function arm is a different path and stays.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Backport of 74fbc7b ("Fix RMV refresh race on concurrent rename of target
storage"), which is in 26.5 and later but was never applied to 26.3.

`TableNode`'s 3-arg constructor reads `storage->getStorageID()`, so the access
checks that key on it see whatever name the storage carries rather than the one
the query named. For a table of a `Filesystem`, `S3` or `HDFS` database that
storage comes from a table function, so its id is `_table_function.<name>`, and
both `checkAccessRights` in the planner and `checkAccessToTableMetadata` in the
resolver demand `SELECT ON _table_function.<name>`: a user granted `SELECT` on
the database is refused. It is also what makes a concurrent `renameInMemory`
visible to the check, which is the race the original commit fixes.

Needed by 05057_file_rename_after_processing_write_grant, whose reader holds
`SELECT` on the `Filesystem` database alone.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`url()` only dispatches by URL scheme from 26.7 on, so `file://` here is served by
the URL engine itself rather than delegated to `StorageFile`: the read never
reaches the grant this test is about, and prints no denial.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@antonio2368
antonio2368 merged commit ad35d28 into 26.3 Sep 8, 2026
32 of 35 checks passed
@antonio2368
antonio2368 deleted the backport/26.3/117895 branch September 8, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants