Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Branch Name
main
Commit ID
e2459cc55f4b514893e19732743460bc5f16d552 — docs: design early runtime filtering and dictionary vector execution (#32380)
Other Environment Information
- macOS
darwin/arm64,16 GiBmemory, Go1.27.1. - Real MinIO built from official
RELEASE.2025-09-07T16-13-09Zsources with the MatrixOne-pinnedminio-go/v7dependency. - Two isolated test buckets on the same MinIO server. FileService caches disabled.
- Reproduced with an external Go test overlay. MatrixOne tracked source files were unchanged.
Actual Behavior
backup.CopyFileWithRetry returns checksum copied backup object: EOF after successfully provider-copying an existing, valid, empty S3/MinIO object. The destination object is already present and StatFile reports Size=0, but the backup copier reports failure and returns no checksum.
The equivalent 1-byte provider copy succeeds. Local DISK and DISK-V2 empty-source stream copies also succeed, so the failing case specifically exercises the provider-copy checksum phase.
Observed output from the direct consumer test
size=0 checksum= copy_err=checksum copied backup object: EOF target_stat=&{object false 0} target_err=<nil>
size=1 checksum=8e35c2cd3bf6641bdb0e2050b76932cbb2e6034a0ddacc1d9bea82a6ba57f7cf copy_err=<nil> target_stat=&{object false 1} target_err=<nil>
Expected Behavior
A successful provider copy of a valid empty object should return success with the SHA-256 of empty content. Its checksum phase should handle the FileService empty-object read contract consistently with stream copying.
Steps to Reproduce
- Start a real MinIO server and create two disposable buckets with the same endpoint and credentials.
- Construct a source and destination using
fileservice.NewS3FS,ObjectStorageArguments.IsMinio=trueandfileservice.DisabledCacheConfig. Select different buckets so the target object is initially absent. - Write an existing empty object to the source FileService.
- Invoke the public backup copier and inspect the target. The core calls are shown below.
sourceandtargetare the two FileServices from step2.
err := source.Write(ctx, fileservice.IOVector{
FilePath: "object",
Entries: []fileservice.IOEntry{{
Size: 0,
ReaderForWrite: bytes.NewReader(nil),
}},
})
require.NoError(t, err)
sourceStat, err := source.StatFile(ctx, "object")
require.NoError(t, err)
require.Zero(t, sourceStat.Size)
checksum, copyErr := backup.CopyFileWithRetry(ctx, source, target, "object", "")
targetStat, statErr := target.StatFile(ctx, "object")
require.NoError(t, statErr)
require.Zero(t, targetStat.Size)
require.NoError(t, copyErr) // fails with "checksum copied backup object: EOF"
require.Equal(t, sha256.Sum256(nil), [32]byte(checksum))Repeat with a newly created source and target bucket and Size=1, using a single byte q. That control passes and yields the checksum shown above.
Additional information
Discovered while independently verifying #32077. Its bounded stream-upload allocation fix passed the real-MinIO checks. This provider-copy behavior predates that fix. git blame attributes the provider-copy checksum phase to 2dd3f83d9e330852daa789253178463f3173c202 (fix(backup): avoid MinIO copy connection deadlock (#26291)).
pkg/backup/tae.go invokes checksumFile after successful provider copy. For an empty object, the FileService Read call returns io.EOF, which currently becomes a checksum error even though the copied object exists. The regression should cover the public CopyFileWithRetry API, provider success, destination visibility, empty-content checksum and a non-empty control.
Activity
fix(backup): verify empty provider-copied objects without EOF failure (…
XuPeng-SH commentedon Nov 10, 2026
QA 交接:修复已合入 main,待验收
关联 PR #32434 已于 2026-11-10 02:25 UTC 合入 main,merge SHA
2f6fcc772175d0c0e80ad97aac6d44360c513347,最终 head48a8abca4b5a2de4a9d8d3bb16ce03dc30f3032e。修复范围:provider copy 成功后的目标对象 checksum 遇到 EOF 时,只有同一文件系统、同名对象 StatFile 确认存在且大小为 0,并且无取消或 Close 错误,才返回空内容 SHA-256。非空、缺失、Stat/Close 错误及取消不应被当作空对象成功。保留 provider-copy 优先级及成功 copy 不重复执行的原有语义。
已有证据(远端记录,本轮未本地实测):PR 作者报告 15 项 focused CGo 回归、manifest/sidecar 读回及 7 项真实 MinIO copy 用例通过;早期 review 在
99a88c256d报告 72 项 owning-package normal tests 通过。后续0c5839dda8review 未重新运行 Go 测试,明确复用有来源的历史结果;Mergify 合并记录显示 CI Required 成功。这些证据不等于本轮复现或 QA 验收通过。建议 QA 在合入版本重跑本 issue 的真实 MinIO 空对象和 1-byte 对照,检查目标可见性及完整 32-byte SHA-256;补充 missing/nonempty、Stat/Close 错误、取消与重试次数边界,并验证 manifest/sidecar。作者 MinIO 版本与原报告版本不同(2023-11-01 与 2025-09-07),原报告版本建议覆盖;完整物理备份/恢复及空 TAE 对象恢复尚无充分验证记录。当前完整 issue 评论及修复讨论未见适用于该合入修复的已验证反例或未完成开发 follow-up,交 Ariznawlll 验证,issue 保持 open。
slyunnn commentedon Nov 11, 2026
Regression and extended verification for #32413 (2026-11-11)
Per the QA hand-off (2026-11-10), the merged fix for #32413 was re-verified on the latest
origin/main: the provider-copy checksum phase now returns success with the full 32-byte SHA-256 for real empty MinIO objects, and the pre-fix failure class no longer occurs on the same MinIO release the issue was originally reported against. Result: Fixed.Verification Environment
mainat553e16f52b—fix(parser): support quoted wildcards in DESCRIBE shortcuts (#32339);git merge-baseconfirms it contains fix merge2f6fcc772175d0c0e80ad97aac6d44360c513347(PR fix(backup): verify empty provider-copied objects without EOF failure #32434, merged 2026-11-10 02:25 UTC). Single-branch verification: this is amainissue;4.2-devwas not verified and no4.2-devresult is claimed.fix(backup): verify empty provider-copied objects without EOF failure. Direction: when the post-copy checksum Read of the copied destination returnsio.EOF, the empty-content SHA-256 is produced only when the same fileservice and the same object nameStatFile-prove an existing size-0object and no context cancellation, Read cancellation or Close error occurred; a missing or non-empty object, aStatFilefailure, aClosefailure and any cancellation keep their original failure. Provider-copy precedence (server-side copy before source readers are opened) and the no-repeat of a successful provider copy are pre-existing behaviour now locked by the merged tests.maintip,go1.27.1darwin/arm64;-versionreports Git commit ID553e16f52b, buildtime1794380911; binary SHA-25633c50723cc82728d59a58d03ba7e879850db0493584d168eab998d79cfb887bc. Deployed as a fresh-data single-version2 CN / 1 TN / 1 LogService + Proxy; Proxy6001, CN116001, CN216002were all connected and answeredgit_version()=553e16f52b(3/3identity consistent). Endpoints carried connectivity/identity and service-health checks only — per the standard caveat those are NOT counted as endpoint regression: this defect and its reproduction live in the physical-backup copy/checksum layer, not in any SQL endpoint path. The service was stopped and all three ports released afterwards.RELEASE.2025-09-07T16-13-09Zdarwin-arm64 binary — the exact release the issue was reported against — SHA-2567c3b3039b76e55a1b80935848ed83998d5e8d317374f87851f46a019ff5c0aa4verified against the published checksum; run locally with an isolated throwaway bucket pair per attempt and FileService caches disabled (DisabledCacheConfig). This closes the hand-off's version note: the PR author's earlier evidence used2023-11-01; the original report's2025-09-07is now covered directly.pkg/backup(tracked MatrixOne sources unchanged) driving the publicbackup.CopyFileWithRetryandbackup.CopyFileAPIs through realfileserviceMinIO/S3 backends, plus a recordingObjectCopierwrapper proving the server-side providerCopyObjectfired (provider_copy=true), plus the merged in-repo focused suite through the repository CGo test harness.What Was Covered
0) viaCopyFileWithRetry: the provider copy fires, the copy returns success, the checksum is the full 32-byte empty digeste3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855, and the destination object is visible with size0— the reportedchecksum copied backup object: EOFsignature no longer occurs.CopyFile: same success, same empty digest, destination visible at size0.559aead08264d5795d3909718cdd05abd49572e84fe55590eef31a88a08fdffd, destination size1.8192-byte patterned object) viaCopyFileWithRetry: success, checksum25df2449b2e5a35fea14e02a7158e283801a1069c9f84631b9a9dacb2f809a7f, destination size8192— ordinary copies are unaffected by the fix.CopyFileWithRetryrun stays successful with the same empty digest and an independently verified destination, consistent with the retry/no-repeat contract.CopyFileWithRetryfor a never-existing object fails withThe specified key does not exist.and creates no destination object — a missing object is not converted into empty-object success.CopyObject(provider_copy=true), so the exercised path is the production provider-copy branch, not the streaming fallback.pkg/backup,15/15top-level tests with their full subtest set;96run/pass log entries,0failures, no unexpected skips) on the same tip: empty-object proof and attached-reader handling (TestChecksumFileReadEOFProvesEmptyObject,TestChecksumFileReadEOFAttachedReader), failure-cause precedence for cancellation/Stat/Close (TestChecksumFileReadEOFCausePrecedence,TestCopyFileWithRetryProviderStatFailures,TestCopyFileWithRetryEOFWithNonEmptyTarget), provider precedence and single read fallback (TestCopyFileUsesProviderCopyBeforeOpeningSourceReaders,TestCopyFileFallbackReadsSourceOnce), no-repeat of a successful provider copy (TestCopyFileWithRetryDoesNotRepeatSuccessfulProviderCopy), and MinIO size-policy handling (TestBackupMinioSizePolicy); backup manifest and checksum-sidecar readback are exercised through the actualsaveTaeFilesListand sidecar helpers as recorded in the PR.6001/16001/16002and9000/9001.StatFilefailure,Closefailure or mid-checksum cancellation: race-prone against a real object server; they are covered deterministically by the merged focused tests named above, and no separate live-server injection was attempted.4.2-dev: the fix merge and this issue targetmain; no4.2-devbuild was verified and no4.2-devconclusion is claimed.Findings
RESULT32413 cases=7 failed=0—PASS, overlay exit0.ok github.com/matrixorigin/matrixone/pkg/backup—15/15top-level tests,0failures.0-byte boundary of the backup copy/checksum phase; the outcome is fully determined by object size and error precedence (the0/1/8192-byte controls above pin it), independent of row counts,LIMIT, block/batch boundaries, memory/spill, concurrency scale, skew, network transfer, index state or resource scale. Data volume cannot surface a new outcome class for this defect.3/3identity) for environment sanity, while the defect-path matrix ran at the storage layer, exactly as the issue was originally reported.MOTR / BVT Coverage
pkg/backupcontract tests that already encode the empty-object proof, precedence rules and readback behaviour; the defect is a Go storage-layer contract that SQL-level.testfiles cannot express, and the hand-off scoped this issue's acceptance to the real-MinIO copy controls. The complementary full-backup/restore-shaped regression remains follow-up material as recorded under Not covered.Final Conclusion
Fixed — verified on
mainat553e16f52b(contains fix merge2f6fcc7721, PR #32434): a successful provider copy of a real empty MinIO object now completes with the full 32-byte empty digest and a visible size-0destination through both public copy APIs on the issue's original MinIO release (2025-09-07), missing objects still fail properly, one-byte, repeated and non-empty copies stay correct, and the causal precedence for cancellation,StatFileandClosefailures remains locked by the merged focused tests.