{"record":{"id":"c110b177ca34c137","repo":"juicedata/juicefs","slug":"failed-to-get-multipart-upload-file-v","errorCode":null,"errorMessage":"failed to get multipart upload file: %v","messagePattern":"failed to get multipart upload file: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/objbench.go","lineNumber":1080,"sourceCode":"\t\t\tfirstPartContent := append(seed, seed...)\n\t\t\tif parts[0], err = blob.UploadPart(ctx, key, upload.UploadID, 1, firstPartContent); err != nil {\n\t\t\t\treturn fmt.Errorf(\"multipart upload error: %v\", err)\n\t\t\t}\n\t\t\tcontent[0] = firstPartContent\n\n\t\t\t// overwrite the last part\n\t\t\tlastPartContent := []byte(\"hello\")\n\t\t\tif parts[total-1], err = blob.UploadPart(ctx, key, upload.UploadID, total, lastPartContent); err != nil {\n\t\t\t\treturn fmt.Errorf(\"multipart upload error: %v\", err)\n\t\t\t}\n\t\t\tcontent[total-1] = lastPartContent\n\n\t\t\tif err = blob.CompleteUpload(ctx, key, upload.UploadID, parts); err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to complete multipart upload: %v\", err)\n\t\t\t}\n\t\t\tr, err := blob.Get(ctx, key, 0, -1)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to get multipart upload file: %v\", err)\n\t\t\t}\n\t\t\tcnt, err := io.ReadAll(r)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to get multipart upload file: %v\", err)\n\t\t\t}\n\t\t\tif !bytes.Equal(cnt, bytes.Join(content, nil)) {\n\t\t\t\treturn fmt.Errorf(\"the content of the multipart upload file is incorrect\")\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\t\treturn utils.ErrNotSUP\n\t})\n\n\tfunFSCase(\"change owner/group\", func() error {\n\t\tif (strings.HasPrefix(blob.String(), \"file://\") || strings.HasPrefix(blob.String(), \"jfs://\")) && os.Getuid() != 0 {\n\t\t\treturn errors.New(\"root required\")\n\t\t}\n\t\tif err := fi.Chown(key, \"nobody\", groupName); err != nil {","sourceCodeStart":1062,"sourceCodeEnd":1098,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/objbench.go#L1062-L1098","documentation":"This error is returned when blob.Get for the just-completed multipart object fails (the initial Get call itself errored). After CompleteUpload the object should be readable; a failure here means the backend returned an error on GET — eventual-consistency lag on some stores, wrong key, permission problem, or the complete actually did not take effect.","triggerScenarios":"Immediately after CompleteUpload succeeds, blob.Get(ctx, key, 0, -1) returns an error: strongly-consistency-lagging backend, object key mismatch, read permission denied, or 404 because completion silently failed server-side.","commonSituations":"Testing against eventually-consistent S3 clones right after complete, bucket policies denying GetObject, benchmark bucket cleaned concurrently by another process.","solutions":["Read the wrapped error: 404 suggests the complete didn't commit; 403 suggests IAM.","Add a short retry/backoff after CompleteUpload for eventually-consistent backends.","Verify the key used in Get matches the key of the multipart upload exactly.","Re-run the benchmark to rule out transient backend errors."],"exampleFix":"// before\nr, err := blob.Get(ctx, key, 0, -1)\nif err != nil {\n\treturn fmt.Errorf(\"failed to get multipart upload file: %v\", err)\n}\n// after\nr, err := blob.Get(ctx, key, 0, -1)\nif err != nil {\n\treturn fmt.Errorf(\"failed to get multipart upload file: %w\", err)\n}\nif rc, ok := r.(io.Closer); ok {\n\tdefer rc.Close() //nolint:errcheck\n}","handlingStrategy":"retry","validationCode":"// after CompleteUpload, optionally confirm object exists before Get\nif obj, err := blob.Head(ctx, key); err != nil {\n\treturn fmt.Errorf(\"object not visible after complete: %w\", err)\n} else {\n\t_ = obj\n}","typeGuard":null,"tryCatchPattern":"r, err := blob.Get(ctx, key, 0, -1)\nif err != nil {\n\treturn fmt.Errorf(\"failed to get multipart upload file: %w\", err)\n}\nif c, ok := r.(io.Closer); ok {\n\tdefer c.Close() //nolint:errcheck\n}","preventionTips":["Add short backoff after CompleteUpload for eventually-consistent stores","Verify GET permissions on the benchmark bucket","Ensure the key matches exactly (no case/slash drift)","Close the returned reader to avoid leaked connections affecting later Gets"],"tags":["object-storage","multipart-upload","read"],"backgroundTag":"file-read-failed","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}