fix(pegboard): delete branch-backed sqlite on actor destroy - #5569
Open
SaiThanushreddy wants to merge 1 commit into
Open
fix(pegboard): delete branch-backed sqlite on actor destroy#5569SaiThanushreddy wants to merge 1 commit into
SaiThanushreddy wants to merge 1 commit into
Conversation
Author
|
@claude review |
Author
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.
Description
Fixes #5561
Destroying a
sqlite: remoteactor cleared only the legacy actor-ID layout (meta_head/shard/delta/pidxviaclear_v2_storage_for_destroy) and left the branch-backed layoutBR/<branch_id>/...(DBPTR->DatabaseBranchId) tombstoned. Branchrefcountstayed1sodepotGC never reclaimed it (branch_rows 39->43in repro).depot::conveyer::branch::delete_database(tombstone +Add(refcount,-1)) so GC can reclaimDatabaseNotFound(tracing::debug!perpegboard-envoypattern)Both
pegboard/src/workflows/actor2/mod.rs:1238 ClearKvandpegboard/src/workflows/actor/destroy.rs:181 ClearKvnow callclear_branch_storage_for_destroyoutside the KVtxn(branch delete has its own versionstampedtxn). Legacyclear_v2kept for pre-branch actors.Type of change
How Has This Been Tested?
cargo check -p pegboard --all-targetsokcargo test -p pegboard --test actor_sqlite_destroy -- --nocapture6/6 ok:actor_destroy_clears_branch_backed_database—refcount 1->0,list_databases []actor_destroy_branch_is_idempotent— double delete no-opactor_destroy_branch_noop_when_no_database— no branch/bucket no-opactor_destroy_clears_both_layouts_like_workflow— legacyclear_v2+ branch delete wiringRepro
repro-actor-destroy-sqlite.shnow showsrefcount 1->0,list_databases [](branchBR/rows remain untilsweep_unreferenced_branchGC — expected logical delete).Checklist: