Repository navigation
fix(fileservice): retry COS multipart init on EOF - #26739
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review of exact head 5268ba72f34ddfacf3624fedf322ee9290c06146.
The focused test and the complete pkg/fileservice suite pass, but the new retry policy has one P1 ownership blocker.
P1 — A raw EOF after COS has committed multipart initialization leaks an unreachable UploadID.
InitiateMultipartUpload is a state-creating POST and has no idempotency key in this call. EOF does not prove that the request was rejected: the server may have created an UploadID and the response can be lost afterward. Retrying then creates another UploadID. The caller only receives the later ID, so the existing completion/abort defer can never clean up the first one. With the 128-attempt loop, one write can leave many server-side multipart sessions behind.
I reproduced this through WriteMultipartParallel on this exact head with a mock COS service that returns a unique ID per init. The first request was fully processed as upload-1, then its successful response was converted to EOF; retry created and successfully completed upload-2. The write returned nil while the server still had upload-1 active. The new checked-in transport test only returns EOF before forwarding the request to the server, so it cannot exercise this ambiguous-commit half of the state space.
Please do not classify an undifferentiated EOF as safely retryable for this non-idempotent operation unless there is a recovery/idempotency protocol that also owns every earlier committed ID. Add the post-commit/response-lost case and assert no orphan remains; preserve the existing pre-commit EOF case as its control.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Approved after rechecking the exact head.
The previous orphan-UploadID concern is closed by removing retry around the non-idempotent multipart-init operation; the QCloud SDK client also keeps its internal retry count at zero. This is the correct conservative ownership contract because a response-lost error cannot prove whether COS committed an UploadID.
The focused tests passed for both a pre-request EOF and response loss after the server committed the init, including EOF, unexpected EOF, timeout, connection reset, broken pipe, and server-closed variants; every case remains a single init attempt.
Merge Queue Status
This pull request spent 41 minutes 40 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Tick the box to put this pull request back in the merge queue (same as
|
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue #26720 ## What this PR does / why we need it: Backport the fixes missing from `4.2-dev` for [#26720](#26720) and [#25114](#25114). Included PRs: - #26711: Fix pipeline remote batch backpressure - #26739: Retry COS multipart initialization on EOF - #26759: Fix IVF prefilter OOM - #26989: Reduce IVF prefilter scan memory copies - #27156: Keep connections alive after long-running requests The changes address vector-index memory usage, file-service retry behavior, remote pipeline backpressure, and frontend connection lifecycle on `4.2-dev`. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: XuPeng-SH <[email protected]>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25114 ## What this PR does / why we need it: fix(fileservice): retry COS multipart init on EOF --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25114 ## What this PR does / why we need it: fix(fileservice): retry COS multipart init on EOF --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25114 ## What this PR does / why we need it: fix(fileservice): retry COS multipart init on EOF --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #25114
What this PR does / why we need it:
fix(fileservice): retry COS multipart init on EOF