fix: S3 Phase 2 round-2 review – versioned blob keys, HEAD+Range, presign expiry, 416 headers#434
Merged
bootjp merged 2 commits intofeature/s3-impl-p2from Mar 26, 2026
Merged
Conversation
…eys, presign expiry Co-authored-by: bootjp <1306365+bootjp@users.noreply.github.com> Agent-Logs-Url: https://github.com/bootjp/elastickv/sessions/c6b3d6f8-f304-4971-b814-702adb37beff
Copilot
AI
changed the title
[WIP] Implement S3 Phase 2 functionality including multipart uploads
fix: S3 Phase 2 round-2 review – versioned blob keys, HEAD+Range, presign expiry, 416 headers
Mar 26, 2026
bootjp
approved these changes
Mar 26, 2026
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.
Addresses six correctness issues identified in the second review of the S3 Phase 2 implementation.
Versioned blob keys (chunk collision + complete race)
uploadPartpre-allocates its commit timestamp before writing any chunks and embeds it asPartVersionin both the part descriptor and blob keys via a news3keys.VersionedBlobKey(). Concurrent re-UploadPartfor the samepartNonow writes to a distinct key space, so chunk data referenced by an in-progressCompleteMultipartUploadis immutable per attempt.appendPartBlobKeysandcleanupPartBlobsAsyncuse the version stored in the manifest/descriptor, so cleanup stays consistent.HEAD + Range
getObjectnow splits HEAD and GET control flow. A ranged HEAD returns206 Partial Content+Content-Range/ partialContent-Lengthwith no body; previously always200.Content-Rangeheader on 416 responsesGET and HEAD with an unsatisfiable range now set
Content-Range: bytes */<totalSize>before writing the 416 body, per RFC 9110 §14.2.Presigned URL
X-Amz-ExpiresrequiredcheckPresignExpiryreturnsAuthorizationQueryParametersErrorwhenX-Amz-Expiresis absent, matching AWS SigV4 semantics. The clock-skew fallback is removed.TODO_s3_review_fixes.md item 2
Corrected to reflect the actual non-blocking
select/skip behavior rather than the previously claimed blocking wait.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.