Failed large file upload leaves the file unfinished and the error has no file id
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Java
- スター
- 103
- フォーク
- 23
- 平均マージ
- 5日 8時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Backblaze/b2-sdk-java のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Backblaze/b2-sdk-java#248 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Backblaze/b2-sdk-java#247 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Backblaze/b2-sdk-java#246 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Backblaze/b2-sdk-java#245 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Backblaze/b2-sdk-java#242 ·
メンテナーはふだん 3 日以内に返信
Backblaze/b2-sdk-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
IETF-Hackathon/pqc-certificates#351 ·
メンテナーはふだん 2 日以内に返信
-
bug(core): skip_nodes.json is missing SELECT and PRE, causing Python and Java to insert separators into dropdown options and preformatted text対応中かも @Bhumit267 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
ExceptionThrowShouldUseContext: NullPointerException on a catch block inside an annotation type対応中かも @Carbon14-48 が今日担当しました。 オープンapproved
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
checkstyle/checkstyle#22784 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信