-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix corruption during CONFLICT upload (#3498)
PBENCH-1219 Large uploads can time out, causing the client (e.g., the 0.69 passthrough server's dispatch) to retry. Eventually, this will result in an `OK` (200) response, which is good. However if we retry before the original operation finishes (it may be still running, despite the client timeout), we catch the already existing "temporary intake directory" as a `CONFLICT` error. Unfortunately, the cleanup logic doesn't recognize this distinction, and still deleted the intake directory on exit. Timed correctly, this could break the original upload: at best, it results in a noisy termination with complaints that the existed temporary directory no longer exists. Fix this problem by attempting to delete only when this API instance has successfully created the temporary directory. Modify the `CONFLICT` unit test case to reproduce the situation more accurately and additionally validate that the directory still exists after completion.
- Loading branch information
Showing
2 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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