Skip to content

Only check disks in the table's storage policy - #16

Merged
rorylshanks merged 1 commit into
mainfrom
scope-disks-to-storage-policy
Oct 21, 2026
Merged

rorylshanks merged 1 commit into
mainfrom
scope-disks-to-storage-policy

Conversation

@rorylshanks

Copy link
Copy Markdown
Collaborator

Problem

upload-freeze failed with ClickHouse disk "s3disk" has unsupported type "ObjectStorage" on servers that have an object-storage disk, even when the source table's storage policy does not use it. freeze.LocalDisks validated every disk in system.disks.

Change

LocalDisks now takes the database and table, and only returns disks in that table's storage policy (system.tables.storage_policy → system.storage_policies.disks). A table that is actually on S3 is still rejected.

Callers updated:

  • upload-freeze: source table
  • compactor / processor: destination table

Verification

  • go mod tidy, go test ./... pass
  • ./e2e/run.sh passes (e2e ClickHouse has only local disks, so the skip-unused-S3-disk case is not covered there)

🤖 Generated with Claude Code

LocalDisks rejected any non-local disk in system.disks, so upload-freeze
failed on servers with an ObjectStorage disk even when the source table
never used it. Scope disk discovery to the table's storage policy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rorylshanks
rorylshanks merged commit cf520ec into main Oct 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant