Repository navigation
Conversation
`PartWriteTxn::ensureBlobPresent` reads the body with `HEAD`, then the marker with a separate `GET`. GC deletes the marker right after the body, so a writer whose `GET` landed after both deletes found no marker, backfilled `Clean` and adopted a deleted body. An absent marker now proves nothing: the body is republished as if absent and the reconcile creates the marker. `CASMetaAdoptBackfill` is replaced by `CASMetaAbsentRepublish`. A publication that landed but lost its response now costs one more upload. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]>
The graduation gate's retry stamps the refusing round, later than `entry.condemn_round`, so `deleteConfirmedMeta` bounded by the entry's round left that `Condemned` marker over a deleted body forever. Bound the delete by the round before the deleting one. Removing a marker never lets a writer adopt, since adoption needs a `Clean` marker. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]>
Fix the `newest_round` argument comment that clang-tidy rejects. Seed a `Clean` marker in the two remaining `CASProtocol` tests that relied on adopting a body without one. Correct the user docs, the README and the comments that still said an absent marker permits adoption or that the marker delete stops at the entry's round. `CASMetaAbsentRepublish` counts publication attempts, not uploads. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ocol The redelete diagram still named the old bound; the delete job removes markers below the deleting round. A failed delete job can still leave a `Condemned` marker behind, so the text no longer says none outlives its body. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]>
k-morozov
approved these changes
Oct 14, 2026
10 of 30 tasks
9 of 31 tasks
7 of 31 tasks
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A writer could commit a reference to a CAS blob that GC had just deleted.
PartWriteTxn::ensureBlobPresentreads the body withHEAD, then the.metamarker with a separateGET. If GC deleted the body and then the marker between those two reads, the writer took the missing marker forClean, backfilled it, and adopted a body that no longer existed. Now only aCleanmarker read after theHEADpermits adoption; a present body with no marker is republished like an absent one.Changes
ensureBlobPresentadopts only onClean; theputMetaIfAbsentbackfill is gone.CASMetaAdoptBackfillis replaced byCASMetaAbsentRepublish(publication attempts started on an absent marker).Gc::applyRedeleteOutcomepasses the deleting round − 1 as the bound, so aCondemnedmarker that the graduation gate re-stamped at a later round is removed with its body. Before, it outlived the body forever and fsck reported it asmeta_without_body.blob-protocol.md,garbage-collection.md,design-history.md,backend.md,part-lifecycle.md,metrics_and_events.mddescribe the new rule.Risks / notes
CASMetaAdoptBackfillsee 0 after the upgrade; readCASMetaAbsentRepublish.Testing
CASPartWriteTxnMarkerRace.AbsentMarkerAfterHeadRepublishes(deletes body and marker between the writer'sHEADand markerGET; the base adopts a deleted body),CASPartWriteTxnMarkerRace.PresentBodyWithoutMarkerRepublishesOnce,CASGcMarker.RedeleteRemovesMarkerRestampedByGate.Clean(CASPartWrite.AmbiguousLandedWriteRepublishesOnceThenClean,CASPartWrite.AmbiguousCopyLandedRepublishesOnceThenClean,CASUploadDetached.*WithoutMetadata*).CAS*gtest: release 2626/2626, ASan 2630/2630.CaGcCondemnMarkerGatereproduces the loss when the writer's two reads are separate steps; the fix is green with GC faults, deposed GC attempts and a recurring envelope token.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixes a rare data loss on CAS (content-addressed storage) disks: an insert that reused an existing blob at the moment GC deleted it could commit a reference to the deleted blob, and later reads of that part failed. The writer now uploads the blob again when its freshness marker is missing instead of reusing it.
Documentation entry for user-facing changes
The CAS architecture docs (
docs/en/antalya/cas/architecture/) and theCASMetaAbsentRepublishevent indocs/en/antalya/metrics_and_events.mdare updated in this PR.CI/CD Options
Exclude tests:
Regression jobs to run: