Repository navigation
Commit 4f2459b
v0.40.6: ImportRepo metadata sweep and cleanup service entry (FU-17, #27)
- Out-of-lock sweep of a detached ImportRepo's git_commit / git_tree /
git_blob / git_tag rows in batches of at most 1000. Each step (a probe,
then at most one delete) is its own short transaction with sequential and
bitmap scans off, so both can only be index scans on a repo_id index that
stop after the rows they need, whatever the statistics say; the delete goes
by primary key behind a non-indexable repo_id guard. A table is done only
when a fresh probe finds no row.
- The cleanup ledger row turns swept together with a phase:"swept" audit row
carrying the per-table counts, accumulated across resumed requests;
record_cleanup_progress / cleanup_by_id / latest_cleanup_for complete the
ledger read side (resolve_cleanup_id no longer queries the entity inline).
- remove_import_repo(path, requester, continuation) -> Removed | Pending |
Absent with a fixed budget per request (16 ledger rows, the request's own
detach included; 100 delete statements): a new operation refuses a parent
with registered children without writing, detaches through the write
queue and sweeps; a continuation finishes one ledger row and never
detaches; a round that detached nothing falls back to the path's ledger.
- GitDbStorage::import_repo_has_children is the one child-check definition,
shared by B3 and the entry. No product entry yet (FU-20 / FU-21).
- Tests: git_db_storage fu17_ (4; query-plan pins for all four tables under
custom and generic plans in three statistics snapshots, and a
production-mode sweep that adds no sequential scan), import_repo fu17_
(14). No schema change.
Plan: docs/plan/plan-20260923.md (FU-17; DEFER-FU-10, DEFER-FU-27).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Eli Ma <eli@patch.sh>1 parent 119d986 commit 4f2459b
6 files changed
Lines changed: 2538 additions & 82 deletions
File tree
- docs/plan
- src
- ceres/pack
- jupiter
- service
- storage
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Large diffs are not rendered by default.
0 commit comments