Conversation
…olk#177) Recursive folder delete removed DB rows but left every underlying object in bucket storage. The code had a TODO acknowledging this and no reaper existed to clean up. Changes: - Collect storage_key values via RETURNING before deleting file rows - Delete blobs from object storage after the transaction commits (best-effort, matching file.Delete's existing pattern) - Log failed blob deletions via slog instead of silently swallowing - Add blobDeleter interface and logger to folder.Service - Document crash-window retention behavior in DEPLOYMENT.md - Add integration test that verifies blob cleanup against real MinIO
sun-970
requested review from
Bindy-lbb,
PeterGuy326 and
waterbro-8
as code owners
September 8, 2026 05:45
修复已完成(本地验证全绿)对应 #177 递归删文件夹清理 blob。 改动:
验证:
未推送原因本 PR 的 head repo 是 其他待办(未动)
|
PeterGuy326
requested changes
Sep 9, 2026
PeterGuy326
left a comment
Collaborator
There was a problem hiding this comment.
Gate decision
REQUEST CHANGES on current head f8eb208af46640efe5ec287cc606916ad3d7ec5a.
Blocking finding
The exact head does not compile. In server/internal/folder/folder.go, the new recursive-delete path uses rows.Close() as if it returned a value at lines 660, 668, and 671. Local reproduction:
go test ./internal/folder
# rows.Close() (no value) used as value
Please push the compile fix to this PR itself, then rerun the full Go/integration matrix. The existing comment says the fix exists elsewhere, but the PR head has not changed, so it cannot be treated as fixed here.
rows.Close() returns no value; the `_ =` prefix caused a compile error.
Collaborator
6 tasks
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.
Summary
RETURNING storage_keyinside the transaction; blob deletion happens post-commit (best-effort), matchingfile.Delete's existing pattern.slog.Warninstead of being silently swallowed.Fixes #177.
Acceptance criteria mapping
DELETE FROM files … RETURNING storage_keyis the source of keys; blob deletes happen after the transaction commitsfolder.blob_delete_failedwarnings with the storage keydocs/DEPLOYMENT.mddocuments that a crash between commit and blob removal may leave orphan objects (same window as single-file delete)TestRecursiveDeleteCleansBlobs) asserts blob cleanup against real MinIO (opt-in viaMEM_TEST_DB+MEM_TEST_S3_ENDPOINT)DeleteupdatedTest plan
go build ./...passesgo vet ./...passesMEM_TEST_DB+MEM_TEST_S3_ENDPOINTset (compose e2e profile)