Large file upload interrupt error does not keep InterruptedException as cause

オープン 初心者向け
#236 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
backend

調査の方向性

変更すべき throw は 2 箇所です。どちらも throw new B2LocalException("trouble", "interrupted exception"); で、core/src/main/java/com/backblaze/b2/client/B2LargeFileStorer.java の 286 行目と 338 行目、storeFile() と storeParts() の中にあります。数行上の ExecutionException の分岐がすでに使っている、原因(cause)を受け取るオーバーロードをコピーし、捕捉した InterruptedException を渡してください。両方の throw が原因として InterruptedException を保持し、core モジュールの既存テストがすべて通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

What happens

When storeFile() or storeParts() is interrupted, the B2LocalException that is thrown does not carry the InterruptedException as its cause, so the stack trace of the interrupt is lost. The other B2LocalException throws in the same methods do pass the cause.

Where

core/src/main/java/com/backblaze/b2/client/B2LargeFileStorer.java:286 and :338: throw new B2LocalException("trouble", "interrupted exception"); (the ExecutionException branch at :283 and :334 passes cause).

Why it matters

Impact: Docs and messages (less diagnostic detail), loud. Severity: Low, because it only loses diagnostic detail, the error itself is still thrown, and it needs an interrupt (unusual).

How to check

Found by reading the code, not reproduced. Read the two throw statements and compare with the constructor overload used a few lines above, which takes a cause.

Version

Seen at v6.5.0. Present on the default branch: present.

主要言語
Java
スター
103
フォーク
23
平均マージ
5日 8時間
マージ済み PR(30日)
3

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Backblaze/b2-sdk-java のほかの issue

Backblaze/b2-sdk-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。