Interrupted large file upload loses the interrupt flag and keeps uploading parts
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
- 55/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- 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