Repository navigation
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? |
|
Fixed the SCA failure in 836c4ef, matching the main-branch fix in #32079. Makefile err-check rejected errors.New in production code; it now uses moerr.NewInternalErrorNoCtx. Existing overlong-source tests assert the MO error code and non-retryability. No successful-copy path, buffer size, concurrency, or other SDK behavior changes. Validation on server 50: repository-wide make err-check; focused BackupSizeReader/SizedCopy/MinioSizePolicy tests; full pkg/backup tests; golangci-lint 2.6.2 on pkg/backup; go vet with the branch-pinned molint on pkg/backup. All passed. git diff --check also passed. The previous run also had a separate BVT failure, which blocked coverage aggregation. This SCA-only update does not claim to resolve that failure or make the whole CI green. The new CI must finish. The PR remains for review only, with the existing performance-validation caveat unchanged; do not merge based on this update alone. |
|
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: 836c4efa8d6e3ed0391e22523a14c934a898e5e0
Assessment: approve
Approve the complete 4.2-dev integration. It reuses logical StatFile and the pinned MinIO SDK's size-aware uploads. The constant-space EOF guard is necessary behind existing length-limited readers and avoids another buffering mechanism. The immutable copier policy reaches data, checkpoint, GC and table-ID-history paths while preserving public defaults, provider-copy behavior, retention and backup formats. Source/error/cleanup analysis and branch-specific tests close the affected paths. Extra source stats and multipart requests are explicit costs of the memory tradeoff; approval does not claim improved foreground latency. The discussion's MO error-class correction is supported by current source, assertions and frozen CI.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Preflight and frozen-range git diff --check passed. The assigned source and diagnostic validation clone remained clean at 836c4ef; preflight.log, diff-check.log and their command/source/exit receipts are retained.
-
Fresh repository make -j4 cgo succeeded for this release branch. native-build.log and native-inputs.json retain the build receipt, exact native input trees, Go 1.26.4 environment and 44 native-file hashes. No incompatible main-branch native artifacts or another job's Go caches were reused.
-
Full ./pkg/backup passed with Go 1.26.4 through repository mo-cgo-test and this member's test-exec, -mod=readonly -json -count=1 -timeout=360s: 69 top-level tests, 214 including subtests, no skips/failures, 120.579 seconds. The four new size-policy/reader/copy/logical-size tests and inherited-GC history, snapshot retention, fresh-WAL restore and table-ID-history cases passed. Evidence: backup-normal.jsonl, backup-normal.stderr.log, backup-normal.exit and checks/1793706423748040380-3.json.
-
Datasync TestCopyFile and TestCopyFiles passed through the same build/runtime owners: two top-level tests, five including subtests, no skips/failures, 0.154 seconds. Evidence: datasync-copy.jsonl, datasync-copy.stderr.log, datasync-copy.exit and checks/1793706645773369323-3.json.
-
The retained sdk-part-size.go probe passed against pinned minio-go/v7 v7.0.99: unknown size selects 528 MiB parts; known 128 MiB selects eight 16 MiB parts. Evidence: sdk-part-size.log and checks/1793706264992867019-3.json. This verifies SDK sizing, not measured RSS or latency.
-
validation-audit.json/log/exit match eight setup/product checks to successful receipts and retained logs, verify clean source fingerprints and assigned caches, reverify all 44 native hashes, and confirm all three discussion keys are covered exactly once in discussion-assessment.json. The audit itself also has a successful check-run receipt. Frozen evidence reports successful applicable UT/build/SCA/BVT checks; skipped jobs were not counted as passes, and no CI was rerun.
Limitations:
-
Real-MinIO boundary uploads, invalid-length publication rejection, fresh end-to-end restore and allocation/RSS results are author-reported in the supplied PR/linked issue evidence; their raw artifacts were not supplied locally. Local validation used package tests and the SDK probe, without a full CN/TN/Proxy deployment or mo-backup CLI incremental-chain acceptance run.
-
The supplied 4.2 copy timing is not a controlled baseline/candidate latency comparison. Main-branch foreground results include increased P95 and incomplete maximum-concurrency validation and do not establish 4.2 latency acceptance. The additional per-stream stat and smaller multipart requests remain explicit costs; no throughput, foreground-latency or whole-process memory guarantee is inferred.
-
The existing immutable backup-source assumption remains applicable; same-length concurrent source replacement is outside this size/EOF guard's protection.
What type of PR is this?
Which issue(s) this PR fixes:
issue #32077
Main companion: #32079. Validated source commit:
c2fb54e6eecb4e5e7db711df413df29abd2fcecc.Review requested, not a merge request: publish for review with the performance tradeoff below disclosed. Do not merge or enable auto-merge pending that review.
What this PR does / why we need it:
4.2-dev has the same backup/MinIO integration inefficiency as main: stream copies pass
Size=-1even for immutable source files with an available logical length. MinIO's unknown-length path allocates a 528 MiB multipart buffer per active upload, including tiny metadata files. This is allocation amplification, not a proven permanent leak.This is the equivalent narrow main fix, adapted to 4.2-dev's existing backup tests and retention code:
is_minio=true.LimitReader/ReadFullcannot report success for an underestimated length; explicitly validate empty sources.NeedCopy=falsefiles stay untouched.Validation
Server 50, Linux amd64, 4.2-dev base
10d204b8763f19b2b37ba2147d1d4c1a7828d6d4, Go 1.26.4 and matching native artifacts:pkg/backuppackage, including existing 4.2-specific history/retention/restore tests and new size/configuration/error-boundary tests.pkg/datasyncTestCopyFile, preserving the public caller contract.pkg/backup: 0 issues.execBackupplus fresh-directory TAE restore: 300 rows, 13 columns, complete restored row multisets match with both old and fixed paths.No full CN/TN/Proxy deployment or mo-backup CLI incremental-chain acceptance is claimed. The real backup fixture validates the kernel copy/restore boundary; unchanged incremental selection and newly added skip assertions are covered by package tests.
Performance Tradeoff / Hold Before Merge
An actual streamed file gains a source Stat/HEAD. For 128 MiB objects the existing SDK uses 8 parts instead of 1, so fifteen files issue 120 rather than 15 part requests. File concurrency is unchanged. This 4.2 copy run completed in about 100.5 s during substantial shared-host I/O pressure; it is not a controlled timing comparison or a speedup claim.
The equivalent main patch was measured with a smaller real-TAE foreground-read ABBA test: two concurrent 128 MiB backup files, real MinIO and 80 ms per-part response delay. QPS improved from 5.93/5.71 to 6.13/6.19 and P99 from 908/971 ms to 321/244 ms, but P95 rose from 165/166 ms to 249/225 ms. This is not a 4.2-specific benchmark or proof of zero business interference. The fifteen-worker mixed test did not finish the comparison within budget and is not counted as a pass.
The user explicitly accepted publishing the minimal patch for review with this risk, not merging it. Shared-storage latency must be assessed before rollout; do not raise backup concurrency because the buffer allocation falls. Source objects retain their existing immutability assumption; the new reader does not detect same-length overwrites.