Failed large file upload leaves the file unfinished and the error has no file id
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start in core/src/main/java/com/backblaze/b2/client/B2LargeFileUploader.java: read uploadLargeFile (around lines 73-80) and the catch and finally blocks in uploadPartsAndFinish (around lines 241-252), which cancel part futures but never the large file. Before changing anything, decide whether leaving the file for resume is intended, since the issue asks for that decision. Done means the failure path either cancels the large file or includes its file id in the thrown error and javadoc, with a test that fails one part and checks unfinishedLargeFiles.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
After uploadLargeFile() has started the large file, any failure (a failed part, an interrupt, a rejected task) is rethrown without calling cancelLargeFile. The unfinished large file stays on the server, and the exception does not mention its file id, so the caller cannot easily clean it up or resume it.
Where
core/src/main/java/com/backblaze/b2/client/B2LargeFileUploader.java:73-80 (start the large file) and :241-252 (the catch and finally blocks, which cancel the part futures but never the large file). Public methods B2StorageClient.unfinishedLargeFiles and cancelLargeFile exist.
Why it matters
Impact: Left behind (an unfinished large file stays on the account), loud. Severity: Medium, because it is only reached after a failure partway through an upload, and the caller can find and cancel the file through unfinishedLargeFiles and cancelLargeFile.
How to check
Found by reading the code, not reproduced. Read uploadLargeFile and uploadPartsAndFinish: there is no call to cancel the large file on any failure path. Failing one part in a test and then listing unfinished large files should show the leftover file. If leaving the file is intended so that finishUploadingLargeFile can resume it, the javadoc could say so and include the file id in the error.
Version
Seen at v6.5.0. Present on the default branch: present.
- Lingua principale
- Java
- Stelle
- 103
- Fork
- 23
- Merge medio
- 5g 8h
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Backblaze/b2-sdk-java
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Backblaze/b2-sdk-java#248 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Backblaze/b2-sdk-java#247 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Backblaze/b2-sdk-java#246 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Backblaze/b2-sdk-java#245 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Backblaze/b2-sdk-java#242 ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di Backblaze/b2-sdk-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
IETF-Hackathon/pqc-certificates#351 ·
I maintainer di solito rispondono entro 2 giorni
-
bug(core): skip_nodes.json is missing SELECT and PRE, causing Python and Java to insert separators into dropdown options and preformatted textForse già presa @Bhumit267 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
ExceptionThrowShouldUseContext: NullPointerException on a catch block inside an annotation typeForse già presa @Carbon14-48 l’ha presa oggi. Apertaapproved
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
checkstyle/checkstyle#22784 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno