Repository navigation
fix(backup): verify empty provider-copied objects without EOF failure - #32434
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 99a88c256d3da65d69c0f84cff97989982057591
Assessment: approve
The EOF-only zero-size proof fixes legitimate empty copies while preserving reader cleanup and cancellation/error precedence. It reuses existing checksum, stat and retry paths without adding shared state or changing backup formats. No actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed the complete three-file delta, checksum consumers and linked issue; reconciled both discussion entries.
-
All 15 focused regressions and all 72 owning-package tests passed in normal CPU mode, including manifest/sidecar readback. Explicit go vet, gofmt and diff --check passed.
-
Preflight passed. Go 1.27.1 archive integrity and rebuilt native-input provenance were verified. Claimed checks match retained logs and receipts in validation-audit.json; source remains unchanged.
Limitations:
-
Real MinIO integration and 44-directory lint results remain attributed author reports; they were not independently repeated locally.
-
Initial toolchain/download attempts were incomplete setup diagnostics and receive no validation credit. Completed replacement checks passed.
✅ Merged into
|
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 0c5839dda89480fc54d28a3f8ac5c00ccbb742bc
Assessment: approve
The EOF-only proof accepts a verified existing zero-length object while preserving cancellation, close/stat failures and checksum-only retry ownership. It reuses the existing checksum/stat path without changing backup formats or adding shared state. No actionable findings.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed the complete three-file delta, all checksum consumers, MinIO read/stat behavior, manifest/sidecar handling, linked issue #32413 and all five discussion entries.
-
Isolation preflight and source/gofmt audit passed: checks/1794272373096296573-3.json and checks/1794272662988033796-3.json; retained logs and validation-audit.json match commands, source and exits.
-
Author reports 15 focused CGo regressions and seven real-MinIO cases passing. Prior review reports 72 owning-package normal passes; backup, FileService, module and native inputs are unchanged from that reviewed head.
Limitations:
-
No fresh local Go tests: required Go1.27.1 download timed out before compilation or execution (checks/1794272581795864576-3.json). This is a setup diagnostic.
-
Product-test, MinIO and lint results remain attributed reports without supplied raw logs. Intervening vector/compile changes prevent claiming complete prior package-build equivalence.
-
Frozen UT/SCA checks remain in progress. Manifest readback does not establish a full restore of an empty TAE object.
What type of PR is this?
Which issue(s) this PR fixes:
issue #32413
Fixes #32413
What this PR does / why we need it:
A physical backup of an empty (0-byte) object could fail after the storage
provider had already copied the object successfully: when checksum
verification read the object back and that Read returned io.EOF, the old
code treated the EOF as a read failure, so a run whose copy actually
succeeded was marked failed.
pkg/backup (tae.go) now accepts the empty object only with a strict proof:
same filesystem and the same object name to StatFile-prove the object
exists with size 0, and requires no context cancellation, Read
cancellation or Close error, before the 32-byte SHA-256 empty digest is
produced;
missing object, a non-empty object, a StatFile failure, a Close failure
or cancellation never verifies as an empty object;
destination entry. A provider copy error is returned directly; the local
read path is used only when the provider reports the copy unhandled
(false, nil) or does not implement the object copier.
The product change is limited to this checksum empty-object proof. The
object-copy precedence (the provider copy is used before source readers are
opened) and the retry semantics (a successful provider copy is never
repeated) are pre-existing behaviour, and the new tests lock them as
regressions; the backup metadata readback is exercised through the actual
saveTaeFilesList and sidecar test helpers.
Validation:
RELEASE.2023-11-01T18-37-25Zsource tag.Local validation commands
The commands used CGo and the worktree's native include/link environment, with the unchanged repository linter configuration.