mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
mononoke: lfs: Return filestore upload result from internal_upload
Summary:
When uploading content to the LFS server it attempts to store the
content in an upstream server, as well as internal data stores. If either of
those fail, then the upload should be considered a failure and the client
should retry. However, D22192005 (ce7f53422f
) refactored the code and accidentally updated
`internal_upload` to always return `Ok(())`.
This meant that a failure to write to the filestore wasn't propagated and so an
upload that actually failed would send an HTTP 200 to the client.
Unfortunately, when the client asks for the blob later the server doesn't know
about it.
Update the code to return `res`, so that errors are propagated.
Reviewed By: krallin
Differential Revision: D35892336
fbshipit-source-id: 5302a34fdd338975e0f0db369ed66692db0ade9f
This commit is contained in:
parent
06973c2937
commit
9b18b0d3be
@ -169,7 +169,7 @@ where
|
||||
STATS::internal_success.add_value(1);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
res.map(|_| ())
|
||||
}
|
||||
|
||||
async fn upstream_upload<S>(
|
||||
|
Loading…
Reference in New Issue
Block a user