Skip to content

Always delete upload file after MoveUploadFileToCache #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

evelynl94
Copy link
Collaborator

An upload files is a temp file with a random uuid name. The uuid name is discarded after the file is committed to the file store and should not be reused. When MoveUploadFileToCache fails, it indicates that there is a problem reading/streaming the file or the content is corrupted. We should delete the upload file regardless to avoid failed uploads accumulating on disk.

@codecov
Copy link

codecov bot commented Aug 31, 2020

Codecov Report

Merging #274 into master will increase coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #274      +/-   ##
==========================================
+ Coverage   66.34%   66.47%   +0.12%     
==========================================
  Files         186      186              
  Lines        9224     9220       -4     
==========================================
+ Hits         6120     6129       +9     
+ Misses       2340     2333       -7     
+ Partials      764      758       -6     
Impacted Files Coverage Δ
lib/store/ca_store.go 62.79% <100.00%> (+7.23%) ⬆️
lib/torrent/scheduler/events.go 72.59% <0.00%> (+1.44%) ⬆️
utils/dedup/interval_trap.go 100.00% <0.00%> (+10.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 631e4d1...685085a. Read the comment docs.

@evelynl94 evelynl94 merged commit c58aef8 into master Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants