multipart upload reliability: retry finish, handle 504, increase verify timeout#368
Open
Goober5000 wants to merge 1 commit intoKnossosNET:mainfrom
Open
multipart upload reliability: retry finish, handle 504, increase verify timeout#368Goober5000 wants to merge 1 commit intoKnossosNET:mainfrom
Goober5000 wants to merge 1 commit intoKnossosNET:mainfrom
Conversation
…verify timeout Large uploads fail when the reverse proxy times out during chunk reassembly, returning 504. The client treated this as failure and retried finish with no server-state verification, causing cascading 500 errors when the server had already completed and deleted the chunks. Changes: - Add multiupload/finish to the GatewayTimeout hack so 504 is treated as tentative success (same pattern as mod/release endpoints) - Add bounded retry loop (max 3) to Finish() with exponential backoff; between retries, call multiupload/start to check the server's done flag via new CheckUploadDone() helper before blindly retrying - Increase verify_part timeout from 45s to 120s to handle disk I/O contention during parallel uploads - Remove premature completed=true assignment in Upload(); Finish() now manages the flag internally Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3630168 to
a7845fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Large uploads fail when the reverse proxy times out during chunk reassembly,
returning 504. The client treated this as failure and retried finish with no
server-state verification, causing cascading 500 errors when the server had
already completed and deleted the chunks.
Changes:
tentative success (same pattern as mod/release endpoints)
between retries, call multiupload/start to check the server's done flag
via new CheckUploadDone() helper before blindly retrying
contention during parallel uploads
manages the flag internally