Interrupted large file upload loses the interrupt flag and keeps uploading parts
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
- 55/100
Direção de pesquisa
Start with the two catch (InterruptedException e) blocks in core/src/main/java/com/backblaze/b2/client/B2LargeFileStorer.java, around lines 285-287 (storeFile) and 336-338 (storeParts), and follow the async chain in storeFileAsync around lines 304-312. Compare them with the handling at B2LargeFileUploader.java line 230, which restores the interrupt flag. Done means the interrupt flag is restored and pending part uploads are cancelled, checked by a test that interrupts a thread while a slow part storer is running.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
What happens
If the calling thread is interrupted while B2LargeFileStorer.storeFile() or storeParts() is waiting on the upload, the method throws a B2LocalException but does not call Thread.currentThread().interrupt() and does not cancel the part uploads. The caller is told the upload failed, while parts (and the final finish step chained to them) can keep running in the executor.
Where
core/src/main/java/com/backblaze/b2/client/B2LargeFileStorer.java:285-287 (storeFile) and :336-338 (storeParts), the catch (InterruptedException e) blocks; the chain that keeps running is storeFileAsync at about :304-312. For comparison, B2LargeFileUploader.java:229-231 does call Thread.currentThread().interrupt() in the same situation.
Why it matters
Impact: Wrong request or result (failure reported while work continues, and the interrupt flag is lost without any message). Severity: High, because it only happens when a thread is interrupted during a large upload (unusual), and there is no workaround: a caller cannot tell whether the file was later finished.
How to check
Found by reading the code, not reproduced. Read the two catch blocks and compare them with B2LargeFileUploader at line 230. A test could start storeFile with a slow part storer, interrupt the thread, and check Thread.currentThread().isInterrupted() and whether the part storers are still running.
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