Failed large file upload leaves the file unfinished and the error has no file id
Mantenedores costumam responder em até 3 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 45/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Java
- Estrelas
- 103
- Forks
- 23
- Merge médio
- 5d 8h
- PRs com merge (30d)
- 3
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Backblaze/b2-sdk-java
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Backblaze/b2-sdk-java#248 ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Backblaze/b2-sdk-java#247 ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Backblaze/b2-sdk-java#246 ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Backblaze/b2-sdk-java#245 ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Backblaze/b2-sdk-java#242 ·
Mantenedores costumam responder em até 3 dias
Todas as issues de Backblaze/b2-sdk-java
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
IETF-Hackathon/pqc-certificates#351 ·
Mantenedores costumam responder em até 2 dias
-
bug(core): skip_nodes.json is missing SELECT and PRE, causing Python and Java to insert separators into dropdown options and preformatted textTalvez já em andamento @Bhumit267 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
ExceptionThrowShouldUseContext: NullPointerException on a catch block inside an annotation typeTalvez já em andamento @Carbon14-48 assumiu hoje. Abertaapproved
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
checkstyle/checkstyle#22784 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia