Repository navigation
Conversation
…surrected A deleted bucket could reappear on other replicated sites. Site replication records a deletion as a tombstone under .minio.sys/buckets/.deleted/<bucket> and the heal loop reconciles buckets from per-site creation/deletion times, but nothing guarded bucket creation itself: - a stale or replayed bucket make (hook retry, syncToAllPeers, a heal snapshot taken before a delete) recreated the bucket on sites where it was deleted; - SetCreatedAt fabricated the current time when the make carried no lineage, so a resurrected bucket looked newer than its own deletion and the heal loop then kept it; - re-deleting a bucket with an existing tombstone silently kept the old tombstone time (MakeVol returns errVolumeExists and the error is ignored), making the recorded deletion older than the actual delete; - GetBucketInfo(Deleted) only reported a tombstone when the bucket volume was already gone, hiding stale tombstones behind a live volume (listBucketsLocal already reported them). PeerBucketMakeWithVersioningHandler is the single choke point for all replicated bucket creations (hook fan-out, heal, syncToAllPeers), so it now rejects makes whose lineage is older than (or missing compared to) the local tombstone, and clears the tombstone when a genuinely newer re-creation wins. MakeBucketHook falls back to a fresh timestamp instead of propagating an unknown lineage, re-deletes refresh the tombstone, and GetBucketInfo(Deleted) reports tombstones consistently. Signed-off-by: Julien Laurenceau <[email protected]>
3 tasks
Member
|
Thank you for the focused fix. This is not included in 20261018000000; keeping it open for next-cycle review. The remaining acceptance is to verify stale and missing-lineage creates, concurrent delete/recreate, repeated deletion timestamps, and restart/offline-peer recovery on current main. Legitimate newer recreations must remain possible. This bucket-level tombstone work is separate from the object-version purge cases in #217. |
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.
Problem
A deleted bucket could reappear on other replicated sites. Site replication records a deletion as a tombstone under
.minio.sys/buckets/.deleted/<bucket>and the heal loop reconciles bucket state from per-site creation/deletion times — but nothing guarded bucket creation itself:MakeBucketHookretry,syncToAllPeersduring site join, or a heal snapshot taken before a concurrent delete — recreated the bucket on sites where it had been deleted;SetCreatedAtfabricated "now", so a resurrected bucket looked newer than its own deletion and the heal loop then kept it;MakeVolreturnserrVolumeExistsand the error is ignored), making the recorded deletion look older than the actual delete;GetBucketInfo(Deleted)only reported a tombstone when the bucket volume was already gone, hiding stale tombstones behind a live volume (listBucketsLocalalready reported them).Matches the item "A deleted bucket could reappear on other replicated sites" in the MinIO AIStor release notes; the tombstone/heal machinery is inherited from the common upstream base.
Changes
PeerBucketMakeWithVersioningHandler— the single choke point for all replicated bucket creations (hook fan-out, heal,syncToAllPeers) — now rejects makes whose creation time is older than (or missing compared to) the local tombstone (errSRStaleBucketCreate), and clears the tombstone when a genuinely newer re-creation wins.MakeBucketHookfalls back to a fresh timestamp instead of propagating an unknown (zero) lineage.getBucketInfoLocalreports tombstones for live bucket volumes too, matchinglistBucketsLocal.Testing
TestSRStaleBucketCreateRejected: makes older than / without lineage are rejected, the bucket stays deleted, the tombstone survives for the heal loop.TestSRNewerBucketCreateClearsTombstone: a newer re-creation succeeds and clears the obsolete tombstone.TestSRGetBucketInfoReportsTombstoneandTestSRDeleteRefreshesTombstone.Signed-off-by: Julien Laurenceau [email protected]