Repository navigation
fix(seaweedfs): Enable lifecycle TTL fast path on nodestore and profiles buckets - #4635
Merged
aldy505 merged 1 commit intoNov 26, 2026
Conversation
…les buckets SeaweedFS 4.4x stopped stamping the lifecycle expiration as a volume TTL on new objects unless the per-bucket lifecycle TTL fast path is enabled, which is off by default. Since the upgrade, new nodestore/profiles objects are written to TTL-less volumes and never expire. Enable the fast path right after setlifecycle and assert it in unit tests. Fixes getsentry#4580 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aldy505
approved these changes
Nov 26, 2026
aldy505
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for doing this!
aldy505
enabled auto-merge (squash)
November 26, 2026 13:31
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.
Fixes #4580.
Problem
Since the upgrade to 26.8.0/26.9.0 (SeaweedFS 4.29 → 4.40), new
nodestoreandprofilesobjects are written to volumes without TTL, so they never expire and disk usage grows without bound. Volumes created before the upgrade still haveTtl:<retention>.The lifecycle rules set by
install/bootstrap-s3-*.share still in place, but SeaweedFS now only stamps theExpiration.Daysrule as a volume TTL atPutObjecttime when the per-bucket lifecycle TTL fast path is enabled, and it is off by default since SeaweedFS 4.32 (seaweedfs/seaweedfs#9825,weed/shell/command_s3_bucket_lifecycle_fastpath.go):Reproduces on upgrades from < 26.8.0, and on fresh installs as well (the fast path is never enabled).
Fix
Right after
setlifecycle, enable the fast path on each bucket with an idempotentweed shellcall:It runs in the same block as
setlifecycle, so it followsAPPLY_AUTOMATIC_CONFIG_UPDATESlike the lifecycle policy. The unit tests for both scripts now assert that the fast path readsenabled.This is the workaround confirmed in the issue thread by several users.
Operator-visible behavior / caveats
SENTRY_EVENT_RETENTION_DAYSlater doesn't extend objects already written (shortening works for new objects only).volume.deletewhen their last write is older than the retention. Happy to document this separately if useful.weed minimust have free volume slots for it. One reporter in New nodestore data has no TTL in SeaweedFS since upgrading to 26.9.0 #4580 hitfailed to find writable volumes for collection:nodestoreuntil passing an explicit-volume.max(possibly SeaweedFS reaches volume limit after upgrading to 26.8.0, despite free disk space #4503). This PR doesn't change-volume.max.(Disclosure: this PR was written with AI assistance, Claude Code. I reported #4580 and reviewed the change.)
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
🤖 Generated with Claude Code