Repository navigation
fix(memory): retry an erase cleanup until it succeeds #503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rahul05ranjan
wants to merge
5
commits into
existence-master:main
Choose a base branch
from
rahul05ranjan:fix-erase-retry
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
57769d4
fix(memory): retry an erase's cleanup until it succeeds (#462)
rahul05ranjan c43ce92
Address review feedback for erase/retry flow
rahul05ranjan cf15b8f
fix(memory): gate erase retries on a completed delete and preserve su…
rahul05ranjan 48e5674
test(memory): build the orphaned-vector retry through a real summary
rahul05ranjan 9cd732d
fix(memory): rowid-reuse-safe retry, 503 on unrecordable cleanup, str…
rahul05ranjan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| **A memory's derived data no longer outlives it when a cleanup step fails once.** Before, if deleting a memory could not finish removing what it fed (a locked file, a transient database error), the leftovers stayed forever and nothing retried; now the unfinished cleanup is queued and replayed by memory upkeep — hourly as well as nightly — until it succeeds, or dropped with a warning after seven days so deleted text never lingers. A retry starts only once the memory row itself is confirmed gone, and a summary's vector is recorded before its row is deleted, so a failed step can never orphan it. | ||
|
|
||
| Two sharp edges found in review are closed as well: a retry records each summary's id next to its rowid, so a new summary that SQLite hands the freed rowid while the retry is waiting is left alone instead of being deleted with its vector; and a delete that could not queue its cleanup for a retry answers "try again" (503) instead of "not found" (404), because the memory is still there. A crash between the delete and its queue mark no longer strands the cleanup forever — upkeep replays old unfinished queue rows once their memory is gone — and a failed retry no longer skips review expiry. |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.