Interrupted large file upload loses the interrupt flag and keeps uploading parts
Maintainer antworten meist innerhalb von 3 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 103
- Forks
- 23
- Ø Merge
- 5 T. 8 Std.
- Gemergte PRs (30 T.)
- 3
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Backblaze/b2-sdk-java
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Backblaze/b2-sdk-java#248 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Backblaze/b2-sdk-java#247 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Backblaze/b2-sdk-java#246 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Backblaze/b2-sdk-java#245 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Backblaze/b2-sdk-java#242 ·
Maintainer antworten meist innerhalb von 3 Tagen
Alle Issues in Backblaze/b2-sdk-java
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
IETF-Hackathon/pqc-certificates#351 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug(core): skip_nodes.json is missing SELECT and PRE, causing Python and Java to insert separators into dropdown options and preformatted textEvtl. vergeben @Bhumit267 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
ExceptionThrowShouldUseContext: NullPointerException on a catch block inside an annotation typeEvtl. vergeben @Carbon14-48 hat das heute übernommen. Offenapproved
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
checkstyle/checkstyle#22784 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag