Skip to content

Fix early manifest deletion in CAS GC - #2730

Draft
k-morozov wants to merge 4 commits into
antalya-26.8from
fix/cas-orphan-manifest-sweep-safety
Draft

k-morozov wants to merge 4 commits into
antalya-26.8from
fix/cas-orphan-manifest-sweep-safety

Conversation

@k-morozov

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

Copy link
Copy Markdown

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC)

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

Fix races in CAS garbage collection that could delete manifests during namespace creation or recreation, causing data loss.

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)

Apply the mount floor to candidates without a catalog row. Recheck each
candidate's full catalog row after floor reads and before reading bodies.
Retain candidates whose namespace appears, disappears, or changes life.

Add deterministic regressions for staged publication and catalog races.
Verification: 8/9 regressions failed before the fix; 9/9 pass after it.

https://gist.github.com/filimonov/1b96ea358804b1c6e22c45380cc65469
https://gist.github.com/k-morozov/13a60ab4424b1b20ba54e4d89b1c0917
Signed-off-by: Konstantin Morozov <just.morozov.k@gmail.com>
Cover rowless mount floors, epoch boundaries, per-namespace catalog changes,
cursor progress after retention, and catalog request counts. Document the
floor and catalog checks before candidate body reads.

Verification: unit_tests_dbms built successfully; 53 tests from
CASOrphanManifestSweep, CASOrphanSweepRequests and CASSweepDeletionPremise
pass. Scoped whitespace checks and documentation anchors pass.

https://gist.github.com/filimonov/1b96ea358804b1c6e22c45380cc65469
https://gist.github.com/k-morozov/13a60ab4424b1b20ba54e4d89b1c0917
https://gist.github.com/k-morozov/5c81c35c5ea432c36f4467ece81dc2ce
Signed-off-by: Konstantin Morozov <just.morozov.k@gmail.com>
Move mount-floor eligibility into `isBuildBelowFloor` and the second
catalog cut into `filterCandidatesByCatalog`. Keep cursor progress in
`planManifestCursorPage` and preserve skip accounting.

Preserve floor caching, request counts and the order of observations.

https://gist.github.com/filimonov/1b96ea358804b1c6e22c45380cc65469
https://gist.github.com/k-morozov/13a60ab4424b1b20ba54e4d89b1c0917
Signed-off-by: Konstantin Morozov <just.morozov.k@gmail.com>
Use `excludeCandidatesWithChangedCatalogEntries` and `rechecked_catalog`
to describe the catalog recheck and its candidate filtering.

https://gist.github.com/filimonov/1b96ea358804b1c6e22c45380cc65469
https://gist.github.com/k-morozov/13a60ab4424b1b20ba54e4d89b1c0917
Signed-off-by: Konstantin Morozov <just.morozov.k@gmail.com>
@k-morozov k-morozov added antalya CAS antalya-26.8 Session label (releasy session config) labels Oct 28, 2026
@github-actions

Copy link
Copy Markdown

Workflow [PR], commit [fa0e5fe]

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.

1 participant