mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 00:20:47 +00:00
This patch series implements `object_storage_base::clone`, which was previously a stub that aborted at runtime. Clone creates a copy of an sstable under a new generation and is used during compaction. The implementation uses server-side object copies (S3 CopyObject / GCS Objects: rewrite) and mirrors the filesystem clone semantics: TemporaryTOC is written first to mark the operation as in-progress, component objects are copied, and TemporaryTOC is removed to commit (unless the caller requested the destination be left unsealed). The first two patches fix pre-existing bugs in the underlying storage clients that were exposed by the new clone code path: - GCS `copy_object` used the wrong HTTP method (PUT instead of POST) and sent an invalid empty request body. - S3 `copy_object` silently ignored the abort_source parameter. 1. **gcp_client: fix copy_object request method and body** — Fix two bugs in the GCS rewrite API call. 2. **s3_client: pass through abort_source in copy_object** — Stop ignoring the abort_source parameter. 3. **object_storage: add copy_object to object_storage_client** — New interface method with S3 and GCS implementations. 4. **storage: add make_object_name overload with generation** — Helper for building destination object names with a different generation. 5. **storage: make delete_object const** — Needed by the const clone method. 6. **storage: implement object_storage_base::clone** — The actual clone implementation plus a copy_object wrapper. 7. **test/boost: enable sstable clone tests for S3 and GCS** — Re-enable the previously skipped tests. A test similar to `sstable_clone_leaving_unsealed_dest_sstable` was added to properly test the sealed/unsealed states for object storage. Works for both S3 and GCS. Fixes: https://scylladb.atlassian.net/browse/SCYLLADB-1045 Prerequisite: https://github.com/scylladb/scylladb/pull/28790 No need to backport since this code targets future feature Closes scylladb/scylladb#29166 * github.com:scylladb/scylladb: compaction_test: enable sstable clone tests for S3 and GCS storage: implement object_storage_base::clone storage: make delete_object const in object_storage_base storage: add make_object_name overload with generation sstables: add get_format() accessor to sstable object_storage: add copy_object to object_storage_client s3_client: pass through abort_source in copy_object gcp_client: fix copy_object request method and body