Repository navigation
Preserve S3 chunks after uncertain PUT commits - #1470
Conversation
Signed-off-by: bootjp <contact@bootjp.me>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b60102f66
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if !mutationAttempted || isRetryableS3MutationErr(err) { | ||
| s.cleanupS3PutObjectChunks(r.Context(), state, upload, bucket, objectKey) |
There was a problem hiding this comment.
Clean up chunks after definitive non-retryable dispatch failures
If the metadata dispatch is rejected locally with kv.ErrLeaderProxyCircuitOpen after the payload has uploaded, this condition now skips cleanup even though the manifest cannot have committed. commitS3PutObject returns mutationAttempted=true whenever it calls the dispatch helper, while normalizeS3MetadataDispatchError preserves this definitive error and isRetryableS3MutationErr returns false for it. Consequently, these failed PUTs retain unreferenced payload chunks unnecessarily, potentially accumulating substantial storage during forwarding failures. Distinguish uncertain outcomes from definitive rejections rather than using retryability as the cleanup criterion.
Useful? React with 👍 / 👎.
Signed-off-by: bootjp <contact@bootjp.me>
|
Addressed the P2 finding: definitive metadata-dispatch rejections now clean uploaded chunks; only an unknown transaction outcome suppresses cleanup. Added a pre-dispatch circuit-open regression for inline and offloaded writes. S3 tests passed locally. @codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Summary
Risk
An indeterminate failed PUT can retain orphan chunks until reconciliation. This is intentional: deleting them could corrupt an object whose manifest committed. Definitive conflicts and pre-dispatch failures still clean up.
Verification
go test ./adapter -run \u0027TestS3(PutObject|UploadPart)LostCommitReplyPreservesReferencedChunks\u0027 -count=1passed.go test ./adapter -run \u0027^TestS3\u0027 -count=1 -timeout=5mpassed.go test ./adapter -count=1timed out after 10 minutes with a large multi-node Raft goroutine dump; sharded CI results are pending.Author: bootjp
Summary by CodeRabbit