Repository navigation
fix(fileservice): zero-fill gaps in write entries on 4.2 - #32779
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? |
|
This pull request is merged. |
|
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: e1398a68ef92703304edaf67f7095367da3ef782
Assessment: approve
The 4.2 backport restores the existing zero-fill contract by clearing only returned gap bytes in the shared reader. It covers all four writer consumers without new state or backend-specific logic. No actionable correctness or design findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Reviewed the complete delta, four write consumers, linked issue #32777 and all three discussion entries; saved plan, change map and discussion ledger.
-
Go1.26.4 focused reader, stream and backend tests passed. The base-reader control fails all four poisoned-gap cases while contiguous controls pass.
-
Owning package: 332 top-level passes, six skips and one Minio credential failure. The same constructor failure reproduces with the base reader; affected FileService cases pass with explicit fixture credentials.
-
Repository-pinned golangci-lint and molint checks passed, together with formatting, diff, clean-source and native loader audits.
-
validation-evidence.json reconciles all 14 terminal check-run receipts with commands, source fingerprints and retained logs.
Limitations:
-
The initial full-package command remains failed; recovery reran only the affected Minio FileService cases. Six existing tests were skipped.
-
The frozen snapshot still had shared build, Go analysis, x86 UT, arm64 SCA and coverage CI pending; these were not counted as passes.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32777. This is the separate 4.2-dev counterpart of the main fix.
What this PR does / why we need it:
FileService's
IOEntry.Offsetcontract says that gaps in a write are zero-filled. The entry reader previously advanced past the gap without initializing the returned bytes, so the result depended on the supplied read buffer. Clear exactly the gap portion before advancing; contiguous input keeps its existing path.Validation on CPU-only Linux with Go 1.26.4:
make static-check-selected STATIC_CHECK_PACKAGES=./pkg/fileservicepassed. The full fileservice package suite was not run.