Repository navigation
Antalya 26.8: Auto-prune expired empty fenced CAS mount slots via cas_auto_forget_fenced_empty_after_sec - #2919
Open
sks wants to merge 1 commit into
Conversation
Adds cas_auto_forget_fenced_empty_after_sec (default 0, disabled) so the CAS GC leader automatically reclaims expired gc_fenced mount slots left behind by ephemeral ASG/pod instances once they own zero catalog namespaces and zero manifest/staging/data objects. 1. ContentAddressedSettings / PoolConfig / ContentAddressedMetadataStorage: add cas_auto_forget_fenced_empty_after_sec. 2. CasServerRoot: track all_fenced_srids in HeartbeatFloor and add pruneExpiredEmptyFencedServerRoots() which verifies m.gc_fenced, expiry age >= threshold, zero entries in cas/ref_catalog, and empty cas/manifests/<srid>/, staging/<srid>/, and roots/<srid>/ prefixes before exact-token deleting mount, epoch, and owner (aborting safely on any ETag Mismatch). 3. CasGc: invoke pruneExpiredEmptyFencedServerRoots() under leader authority after heartbeat_floor when configured. 4. Add ProfileEvents::CASGCAutoPrunedFencedMounts, unit tests in gtest_cas_decommission.cpp, and docs in docs/en/antalya/cas/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
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
Deployments with ephemeral ASG/pod instances that use instance- or pod-scoped
cas_server_root_idvalues accumulate permanentgc_fencedmount entries undergc/server-roots/<srid>/andsystem.cas_mountsafter scale-in or rolling replacements. Removing empty retired slots currently requires manual operator intervention.Changes
ContentAddressedSettings.cpp,CasPool.h,ContentAddressedMetadataStorage.h/.cpp):<cas_auto_forget_fenced_empty_after_sec>(default0, disabled).CasServerRoot.h/.cpp,CasGc.cpp,ProfileEvents.cpp):all_fenced_sridsinHeartbeatFloor.pruneExpiredEmptyFencedServerRoots(), called by the GC leader afterheartbeat_floorwhencas_auto_forget_fenced_empty_after_sec > 0and leader authority is held.srid != own_sridandm.gc_fenced == true,now_ms - m.expires_at_ms >= cas_auto_forget_fenced_empty_after_sec * 1000,cas/ref_catalog(Creating,Live, orRemoving) matchsridorsrid + "/", andcas/manifests/<srid>/,staging/<srid>/, androots/<srid>/are all empty.mount,epoch, andownerusing exact-tokenop.remove(aborting safely on anyRemoval::Mismatch), emits aMemberDecommission(outcome = "auto_pruned") event, and incrementsProfileEvents::CASGCAutoPrunedFencedMounts.CASAutoPruneFencedMounts.PrunesEmptyExpiredFencedSlotAfterThresholdandCASAutoPruneFencedMounts.SkipsFencedSlotWithCatalogNamespaceOrManifestDebrisinsrc/Disks/tests/gtest_cas_decommission.cpp.cas_auto_forget_fenced_empty_after_secindocs/en/antalya/cas/configuration.md.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added the
cas_auto_forget_fenced_empty_after_secCAS disk setting to let the GC leader automatically prune expired, emptygc_fencedmount slots left behind by ephemeral instances.Documentation entry for user-facing changes
docs/en/antalya/cas/configuration.md.CI/CD Options
Exclude tests:
Regression jobs to run: