Skip to content

CAS: backup native copy - #2415

Open
k-morozov wants to merge 4 commits into
antalya-26.6from
cas/backup-native-copy-bug
Open

k-morozov wants to merge 4 commits into
antalya-26.6from
cas/backup-native-copy-bug

Conversation

@k-morozov

@k-morozov k-morozov commented Sep 22, 2026 •

Copy link
Copy Markdown

BACKUP of a table on a CAS to an S3 destination that shares the pool's endpoint failed outright, and the code path that failed would have silently corrupted the backup had it not failed.

BackupWriterS3::copyFileFromDisk asks S3 to copy the source object server-side. That assumes the file is that object, whole, from byte 0. On a CAS disk neither half holds:

  • A small per-part file (checksums.txt, count.txt, columns.txt, ...) is an inline manifest entry with no object of its own. getStorageObjects returns a sized placeholder with an empty remote key, deliberately poisoned so a reader that bypasses the read path fails loudly rather than reading someone else's bytes. The copy passed that empty key to CopyObject, so every BACKUP died with Invalid argument - these files exist in every part.

  • A blob object is [envelope][payload] and the payload is the file. BlobLocation carries the payload offset, but getStorageObjects returns only key and length and getBlobPath keeps only the key, so the copy started at byte 0 and pulled the envelope into the backup. RESTORE then failed.

    The first failure masked the second: checksums.txt aborted the backup before any blob corruption
    could surface. Fixing only the empty key would have turned a loud failure into backups that report
    success and cannot be restored.

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Fixed BACKUP of a table on a CAS to an S3 destination on the same endpoint.

Documentation entry for user-facing changes

Adds docs/en/antalya/cas/operations/backup.md describing how BACKUP/RESTORE behave on a content-addressed disk, and links it from the CAS index and roadmap.

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

Signed-off-by: Konstantin Morozov <just.morozov.k@gmail.com>
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Workflow [PR], commit [b130c47]

Signed-off-by: Konstantin Morozov <just.morozov.k@gmail.com>
Signed-off-by: Konstantin Morozov <just.morozov.k@gmail.com>
Signed-off-by: Konstantin Morozov <just.morozov.k@gmail.com>
@k-morozov
k-morozov marked this pull request as ready for review September 24, 2026 15:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant