Repository navigation
fix(storage): apply StorageConfig.TTL as the default entry TTL in Put - #223
Merged
Merged
Conversation
Removing the metadata DB's engine-level TTL (#218) left StorageConfig.TTL with no consumer: a Put with no key-level TTL never received an expiry, so configured default expiry silently stopped working (flagged by Cursor Bugbot on the release PR). Apply the default app-side in Put, where expiry is enforced by the cleaner — which stages file and segment reclamation — instead of the engine filter that dropped bookkeeping keys and orphaned backing bytes. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01L5DLvDTo9dhD38YQXhHpU9 Signed-off-by: Ovais Tariq <[email protected]>
Greptile SummaryApplies
Confidence Score: 5/5The PR appears safe to merge, with default expiration restored through the existing application-level expiry and cleanup paths. The configured TTL now reaches Important Files Changed
Reviews (1): Last reviewed commit: "fix(storage): apply StorageConfig.TTL as..." | Re-trigger Greptile |
|
🎉 This PR is included in version 1.10.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 the High-severity Cursor Bugbot finding on release PR #221: after #218 removed the metadata DB's engine-level TTL,
StorageConfig.TTLhad no remaining consumer — aPutwith no key-level TTL never received an expiry, so the documented "default TTL when no key-level TTL is set" contract silently stopped working (server-ttlusers would never expire data; TAG is unaffected since it passes explicit per-put TTLs).Fix: apply the default app-side in
Put(ttl <= 0 → s.defaultTTL), where expiry is enforced by the cleaner — which stages file/segment reclamation correctly — rather than by the engine filter, which dropped internal bookkeeping keys and orphaned backing bytes (the original #218 motivation).Tests: new
TestPut_AppliesConfiguredDefaultTTL(default applied when configured; no expiry when unconfigured),TestDeleteIndexSurvivesEntryTTLstill passes, full./storage/...suite green (11 packages).🤖 Generated with Claude Code
https://claude.ai/code/session_01L5DLvDTo9dhD38YQXhHpU9
Note
Cursor Bugbot is generating a summary for commit 701d02d. Configure here.