Skip to content

Antalya 26.8 BACKUP of CAS tables to S3 on the same endpoint - #2508

Draft
k-morozov wants to merge 6 commits into
feature/antalya-26.8/pr-2159from
feature/antalya-26.8/pr-2159-cas-backup
Draft

k-morozov wants to merge 6 commits into
feature/antalya-26.8/pr-2159from
feature/antalya-26.8/pr-2159-cas-backup

Conversation

@k-morozov

@k-morozov k-morozov commented Oct 8, 2026 •

Copy link
Copy Markdown

Related: #2415

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 disk to an S3(...) or Disk(...) destination on the same S3 endpoint as the pool.

Documentation entry for user-facing changes

...

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)

filimonov and others added 4 commits October 7, 2026 17:13
BACKUP of CAS tables to S3 on the same endpoint
CAS backup blobs less 5mb: a CAS blob whose source object is not greater
than 5 MB is copied through buffers, because S3 accepts a byte range on
`UploadPartCopy` only from a source object greater than 5 MB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`copyS3File` lost its offset argument: a whole-object copy and a ranged
copy are now two separate functions. A CAS blob is `[envelope][payload]`,
so its copy is always ranged. Pass the blob size from the view plan as the
source object size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fers

S3 accepts a byte range in `UploadPartCopy` only from a source object
greater than 5 MB, so such a blob is read through the `CAS` read path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@k-morozov k-morozov changed the title Feature/antalya 26.8/pr 2159 cas backup Antalya 26.8 BACKUP of CAS tables to S3 on the same endpoint Oct 8, 2026
@k-morozov k-morozov added antalya CAS antalya-26.8 Session label (releasy session config) labels Oct 8, 2026
k-morozov and others added 2 commits October 8, 2026 18:13
Upstream now has a ranged S3 copy: `copyS3FileRange` copies only
`[offset, offset + size)` of a source object with `UploadPartCopy`, and
falls back to buffers when the source object is 5 MB or smaller or when
multipart copy is not available (ceeb177, 5c28acb). Before it,
#2415 needed its own path for CAS blobs, because a blob is
`[header][payload]` and a whole-object copy would put the header into
the backup.

With the upstream ranged copy, a CAS blob can go through the common
`BackupWriterS3::copyFileFromDisk` path. Only the offset, the source
object size and the fallback reader change: the offset includes the
blob header, and the reader reads the raw object, so both use object
coordinates. `whole_object` is now computed from this offset, so a CAS
blob never takes `CopyObject`.

This lets us drop the extra code that #2415 added to upstream files:
- remove `tryNativeCopyFromContentAddressedDisk` and the 5 MB check;
  `copyS3FileRange` routes small blobs and stores without multipart
  copy to buffers itself;
- remove `DataSourceDescription::files_are_whole_objects` and
  `canUseNativeCopyWith`, and restore the upstream `sameKind` and `==`
  checks and data source description initializers;
- guard the native copy with `isContentAddressed` instead: the S3 and
  Azure backup readers, the Azure backup writer and
  `DiskObjectStorage::copyFile`.

A CAS file goes through buffers when it is stored in the manifest
(empty key) or is not a blob. Add trace logs with the reason for both
cases, and for a ranged copy that cannot be native in `copyS3File`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A blob that cannot be copied inside `S3` is now read from its object in
the pool, only the payload range, by the fallback of `copyS3FileRange`,
not through the `CAS` read path. Also say that only the endpoint has to
match for the copy inside `S3` (the backup can be in another bucket),
and that a `CAS` disk cannot be a backup destination.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

Labels

antalya antalya-26.8 Session label (releasy session config) CAS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants