fix: do not retry multipart upload chunk on 404 (upload session not found)
This commit is contained in:
@@ -2681,9 +2681,8 @@ func (o *Object) uploadFragment(ctx context.Context, url string, start int64, to
|
||||
}
|
||||
return true, fmt.Errorf("retry this chunk skipping %d bytes: %w", skip, err)
|
||||
} else if err != nil && resp != nil && resp.StatusCode == http.StatusNotFound {
|
||||
fs.Debugf(o, "Received 404 error: assuming eventual consistency problem with session - retrying chunk: %v", err)
|
||||
time.Sleep(5 * time.Second) // a little delay to help things along
|
||||
return true, err
|
||||
fs.Debugf(o, "Received 404 error: upload session not found - not retrying: %v", err)
|
||||
return false, fserrors.NoLowLevelRetryError(err)
|
||||
}
|
||||
if err != nil {
|
||||
return shouldRetry(ctx, resp, err)
|
||||
|
||||
Reference in New Issue
Block a user