Repository navigation
Description
Problem
Reviewing #46 exposed a separate checksum-placement problem in CopyObject.
When CopyObject needs a server-computed destination checksum and destination compression is enabled, the current handler starts newS2CompressReader and later attaches AddServerSideChecksumHasher to srcInfo.Reader. That reader represents the storage stream, not necessarily the logical S3 plaintext stream. The compression goroutine can also begin consuming input as soon as it is created.
Static data-flow therefore indicates that the stored checksum can cover compressed bytes, or miss bytes consumed before the hasher is attached, instead of covering the logical destination object. This needs an API-level reproduction before the final patch is accepted.
Relevant code:
- cmd/object-handlers.go: destination compression and AddServerSideChecksumHasher
- cmd/object-api-utils.go: newS2CompressReader and PutObjReader
- cmd/erasure-object.go: RawServerSideChecksumResult persistence
Relationship to #46
#46 will intentionally fix only UploadPart and UploadPartCopy. It will establish one shared internal invariant for later fixes:
- PutObjReader retains a dedicated logical plaintext checksum reader, distinct from the storage reader.
- A fallback server-side hasher is installed in the handler before compression or encryption can consume data.
- The object layer validates the effective algorithm and persists the result.
The CopyObject fix should reuse that exact mechanism in a separate PR. It must not add a second checksum-reader abstraction or attach the hasher later in the object layer.
Proposed direction
- Reuse the unexported checksum reader introduced by UploadPart requires a per-part checksum header that AWS S3 computes server-side #46.
- Preserve the pre-compression CopyObject reader as the logical checksum source.
- Install the server-side hasher before newS2CompressReader starts.
- Keep supplied client checksum validation unchanged.
- Verify that the checksum returned by HEAD/GET covers logical object bytes for compressed and encrypted destinations.
Acceptance criteria
- API-level reproduction of the current compressed CopyObject behavior.
- Correct server-computed CRC32, CRC32C, CRC64NVME, SHA1, and SHA256 where supported.
- Tests for default, compressed, encrypted, and compressed plus encrypted modes.
- Explicit SSE-C and SSE-S3 coverage where applicable.
- Targeted race test proving no hasher installation occurs after reader consumption begins.
- No public API or on-disk format change beyond the existing checksum metadata representation.
This issue is deliberately separate from #46 so the multipart P0 can be reviewed, released, and rolled back independently.
Activity
fix: compute multipart part checksums server-side
Vonng commentedon Aug 24, 2026
Implementation and adversarial-review completion:
The original issue hypothesis contained two possible failure modes. Dynamic reproduction confirmed the wrong-data-domain failure. It did not find bytes missed before hasher attachment; the hasher observed the complete transformed stream. The fix still installs the logical hasher before the compression goroutine starts, which removes both ordering ambiguity and the demonstrated domain error.
The review also reproduced two inherited adjacent gaps and kept them out of this issue's rollback boundary:
No silo-pkg change is needed because it does not own the server reader chain. SILO Console only passes CopyObject through minio-go. MCLI deliberately switches away from server-side CopyObject when --checksum is requested, so neither needs a duplicate patch.
The archived minio/minio upstream retains the original defect. The merged SILO fix changes no public server API and no on-disk checksum representation. Existing wrong checksum metadata is not automatically backfilled; operators must verify and explicitly rewrite affected copied objects.
Vonng commentedon Aug 24, 2026
Documentation follow-up submitted
The bilingual design expansion is complete:
The PR build, Cloudflare preview, post-merge Hugo build, and GitHub Pages deployment passed. Both live routes return HTTP 200.
Online adversarial review prompt for commit b87146a1
你是一名对 S3 兼容性、Go 流式 I/O、MinIO/SILO 内部实现、checksum、压缩、加密、版本控制与 Hugo 双语技术文档都非常熟悉的资深维护者。
请对下面这个文档 commit 做一次只读、证据驱动、对抗性的 Code/Design Review。不要修改仓库,不要因为 PR、CI 或文档已经合并就默认它正确。你的任务是尽可能证伪文档中的技术结论、因果关系、正确性证明、测试声明、跨仓库边界与运维建议。
审查目标
必须核对的实现证据
所有动态状态都必须现场复核。尤其不要假设 minio-go PR minio#2295 已经合并,也不要把源码 merge、文档 deploy 与 SILO release/package/image publication 混为一谈。
审查程序
重点攻击面
输出格式
严格使用以下结构:
如果没有 finding,也必须说明你具体检查了哪些失败模式。不要只复述文档,不要把已有 CI 绿灯当成技术正确性的替代品。