Skip to content

Antalya 26.8: Allow Suspended S3 bucket versioning via cas_allow_versioning_suspended - #2918

Open
sks wants to merge 1 commit into
Altinity:antalya-26.8from
stackgenhq:feat/antalya-26.8/cas-allow-versioning-suspended
Open

sks wants to merge 1 commit into
Altinity:antalya-26.8from
stackgenhq:feat/antalya-26.8/cas-allow-versioning-suspended

Conversation

@sks

@sks sks commented Nov 18, 2026

Copy link
Copy Markdown

Problem

On AWS S3, once a bucket has ever had versioning enabled, suspending versioning (BucketVersioningStatus::Suspended) stops creating new noncurrent versions for new keys, but DeleteObject (without VersionId) still creates a "null"-version delete marker (x-amz-delete-marker: true). CasObjectStorageBackend::removeUnder() returns RawRemoval::DeleteMarker, which causes CasOperation::removeUnder() to throw CAS_DELETE_MARKER and CasProbe to refuse the mount with NOT_IMPLEMENTED (Code: 48), even when versioning is suspended and an ExpiredObjectDeleteMarker lifecycle rule is configured.

Changes

  • Distinguish Suspended vs Enabled (IObjectStorage.h, S3ObjectStorage.h/.cpp):
    • Added IObjectStorage::BucketVersioningStatus (Unknown, Disabled, Suspended, Enabled) and getBucketVersioningStatus(), preserving isBucketVersioningEnabled() for existing callers/tests.
  • Opt-in setting (ContentAddressedSettings.cpp, ContentAddressedMetadataStorage.h/.cpp):
    • Added <cas_allow_versioning_suspended> (default false) and passed it to ObjectStorageBackend.
  • Backend & probe gating (CasObjectStorageBackend.h/.cpp, CasProbe.cpp):
    • When cas_allow_versioning_suspended=true on an ETag-dialect Native mount, verifySuspendedVersioningAllowed() checks getBucketVersioningStatus() at checkPoolPreconditions() (and before accepting any delete marker):
      • BucketVersioningStatus::Enabled is always refused (NOT_IMPLEMENTED), even when cas_allow_versioning_suspended=true.
      • BucketVersioningStatus::Suspended (or Unknown) logs a Warning advising an ExpiredObjectDeleteMarker: true S3 lifecycle rule and accepts created_delete_marker = true as RawRemoval::Removed.
    • Updated CasProbe's CAS_DELETE_MARKER error text to mention cas_allow_versioning_suspended.
  • Tests & Docs:
    • Added CASBackendGeneration.S3SuspendedVersioningRequiresOptInAndStillRefusesEnabled in src/Disks/tests/gtest_cas_backend_generation.cpp.
    • Updated docs/en/antalya/cas/bucket-requirements.md and docs/en/antalya/cas/configuration.md.

Changelog category (leave one):

  • New Feature

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

Added the cas_allow_versioning_suspended CAS disk setting to permit mounting and reclaiming objects on S3 buckets whose object versioning is Suspended (while continuing to reject Enabled buckets).

Documentation entry for user-facing changes

  • Documentation is written: updated docs/en/antalya/cas/bucket-requirements.md and docs/en/antalya/cas/configuration.md.

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)

…ing_suspended

Allows mounting and reclaiming objects on an S3 bucket whose versioning is Suspended (never Enabled) when opted in via <cas_allow_versioning_suspended>true</cas_allow_versioning_suspended>.

1. IObjectStorage / S3ObjectStorage: add BucketVersioningStatus (Unknown, Disabled, Suspended, Enabled) and getBucketVersioningStatus() so S3ObjectStorage distinguishes Enabled from Suspended while preserving isBucketVersioningEnabled().
2. ContentAddressedSettings / ContentAddressedMetadataStorage: add cas_allow_versioning_suspended (default false) and wire it into ObjectStorageBackend.
3. CasObjectStorageBackend / CasProbe: verify getBucketVersioningStatus() != Enabled when opted in (always refusing Enabled buckets) and accept S3 null-version delete markers (created_delete_marker=true) as Removed with a startup warning advising an ExpiredObjectDeleteMarker lifecycle rule.
4. Add unit test S3SuspendedVersioningRequiresOptInAndStillRefusesEnabled in gtest_cas_backend_generation.cpp and update docs/en/antalya/cas/{bucket-requirements,configuration}.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sabith <sks@stackgen.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants