Repository navigation
Cherry pick #129044 to 26.10: Fix identity of dynamic disks with server credential markers - #130455
Merged
robot-ch-test-poll2 merged 11 commits intoNov 10, 2026
Merged
Conversation
A dynamic disk is named after a hash of its definition, which includes the credential markers the server appends. The Azure marker is now added only when the resolved disk uses the server's own Azure identity, and a definition that matches no registered disk is also tried in the forms stored by older versions. A short `ATTACH` keeps the stored markers. A session without `s3_allow_server_credentials_in_user_queries` can no longer use a disk with server credentials through a wrapper disk or a definition that resolves differently since the disk was created. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A session without `s3_allow_server_credentials_in_user_queries` could use a disk with server credentials through its implicit `__<disk>` storage policy. Refuse it on `CREATE`, user `ATTACH` and `ALTER ... MODIFY SETTING`. A disk function now passes every registered disk it matches to the disk that wraps it, so a wrapper declared by an older version is found even when the disk of the newer form below it is registered too. Move the paths of the `encrypted` disks in 05496 inside `custom_local_disks_base_directory`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…LTER `StorageFactory::Arguments::getDisk` and `getStoragePolicy` resolve a disk or a storage policy named by a table definition and, unless the table is loaded from existing metadata, refuse a custom disk with server credentials for a session without `s3_allow_server_credentials_in_user_queries`. `Log`, `TinyLog`, `StripeLog`, `Set`, `Join`, `Distributed` and the MergeTree `storage_policy` setting use them. `ALTER ... MODIFY SETTING storage_policy` checks the policy only when it changes. In 05496, wrap local disks under `custom_local_disks_base_directory` and drop every table right away, so that no table names a disk of another table. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # src/Storages/StorageFactory.h
A forbidden `storage_policy` must be reported by the constraint check, not as an unknown policy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Master now checks the effective storage policy before the per-setting loop, so the credentials check has to run there to be reported first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # src/Storages/MergeTree/MergeTreeSettings.cpp
Fix identity of dynamic disks with server credential markers
The release has no Azure server credentials marker (#120343), so only the form without `_server_credentials_allowed` is tried, and the Azure test is dropped. The `storage_policy` check of `ALTER` runs in the per-setting loop of the release. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original pull-request #129044
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Before you resolve anything
Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job