Large file upload reports a failed part only after all other parts finish

Offen
#237 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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
66/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
java
Bereich
cloud

Rechercherichtung

Start in core/src/main/java/com/backblaze/b2/client/B2LargeFileStorer.java at storePartsAsync, where the allOf(...) near line 361 waits for every part. Compare how B2LargeFileUploader.java (around lines 249-251) cancels the remaining futures when one fails. Done when a failing part cancels its siblings and the error surfaces without waiting for slow parts, which a test with one failing and one slow part storer can show.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

What happens

B2LargeFileStorer.storePartsAsync() waits for every part with CompletableFuture.allOf, which only completes after all part futures are done, and it does not cancel the remaining parts when one fails. If a part fails early, the caller keeps waiting while the other parts upload to the end, then gets the error. B2LargeFileUploader handles this differently and cancels the other futures when one fails.

Where

core/src/main/java/com/backblaze/b2/client/B2LargeFileStorer.java:361 (allOf(...) in storePartsAsync); compare core/src/main/java/com/backblaze/b2/client/B2LargeFileUploader.java:249-251, which calls cancel(true) on the remaining futures.

Why it matters

Impact: Wrong request or result (the error is delayed and bandwidth is spent on a file that cannot be finished), loud. Severity: High, because it happens on the normal path whenever a part upload fails during a multi-part upload, and the caller has no way to stop the remaining parts early.

How to check

Found by reading the code, not reproduced. Read storePartsAsync: the returned future is built on allOf, and nothing cancels sibling futures or sets the cancellation token on the first failure. A test with one failing part storer and one slow part storer should show the error arriving only after the slow part completes.

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

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Backblaze/b2-sdk-java

Alle Issues in Backblaze/b2-sdk-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.