-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
objstore.DownloadDir() doesn't correctly cleanup on failure #3941
Comments
Ideally it deletes all it downloaded if requested. WDYT? It's sounds like a bug. |
Could you please print the whole directory tree of when this happens if possible? |
I do agree. I'm actually thinking whether it's easier to change |
Yeah. Unfortunately happened on a customer cluster and I just got this report (I wasn't actively debugging it). |
I presume your customer doesn't run code from |
I think this bug would arise when the |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Closing for now as promised, let us know if you need this to be reopened! 🤗 |
What happened:
We've seen an error like this:
From a quick look at the
DownloadDir()
implementation (code) I think it doesn't cleanup cleanup on failure when the downloaded directory contains subdirectories too (eg. blockchunks/
).I see a couple of issues:
downloadedFiles
is not populated whenDownloadDir()
is called recursivelydownloadedFiles
is populated with thedst
and not actually the downloaded file, but then we delete it we callos.Remove()
(non recursive)What you expected to happen:
Fixing the logic should be easy, but I'm not sure what's the desired behaviour. Do we expect
DownloadDir()
to delete everything including subdirectories?The text was updated successfully, but these errors were encountered: