Repository navigation
fix: return 503 instead of 404 when commit metadata is missing - #232
Merged
Vonng merged 4 commits intoOct 15, 2026
Merged
Conversation
When the staged xl.meta disappears between the data rename and the meta-file commit inside RenameData(), the affected drives return errFileNotFound. An in-quorum errFileNotFound is reduced by reduceWriteQuorumErrs() and previously surfaced as: - IncompleteBody (400) from PutObject(), misattributing the failure to a client disconnect, or - ObjectNotFound (404 NoSuchKey) from CompleteMultipartUpload(), telling clients the object is absent so they skip retries. Map errFileNotFound at the commit step to a dedicated internal errCommitMetaMissing, convert it to errErasureWriteQuorum in renameData(), and map it to InsufficientWriteQuorum (HTTP 503) in toObjectErr() so clients retry. Below-quorum outcomes already return InsufficientWriteQuorum and are unchanged, as is the IncompleteBody mapping for staging failures of client-disconnected uploads. Signed-off-by: Julien Laurenceau <[email protected]>
Drive renameData() with stub disks to assert that an in-quorum errCommitMetaMissing is converted to errErasureWriteQuorum (HTTP 503) and that an in-quorum errFileNotFound still surfaces unchanged so PutObject() keeps returning IncompleteBody for client disconnects. Signed-off-by: Julien Laurenceau <[email protected]>
…r-completion Signed-off-by: Feng Ruohang <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
This was referenced Oct 24, 2026
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.
Problem
If staged
xl.metadisappears at the final metadata rename insidexlStorage.RenameData(), the olderrFileNotFoundclassification can report400 IncompleteBodyfor PUT or404 NoSuchKeyfor multipart completion. A server-side commit failure should be retryable.Change
Return a dedicated
errCommitMetaMissingonly at the final metadata commit. Preserve it across storage RPC, reduce failed write quorums toerrErasureWriteQuorum, and map the direct object/healing path toInsufficientWriteQuorum. The actual S3 response is HTTP 503 with codeSlowDownWrite.Staging failures retain their existing classification. A successful write quorum is preserved, and a failed write still rolls back only its successfully committed drives. Storage formats, RPC fields and dependencies are unchanged. This classifies the failure; it does not restore lost staging data or guarantee that a retry succeeds.
Validation
SlowDownWrite/503.make verifiersandmake buildpass locally on Go 1.27.2.file not found, confirming that they detect the original defect.