Large file uploads do not send src_last_modified_millis like small uploads do

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

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

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

評価

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

調査の方向性

core/src/main/java/com/backblaze/b2/client/structures/B2StartLargeFileRequest.java の buildFrom(125~157行目付近)から始め、core/src/main/java/com/backblaze/b2/client/B2StorageClientWebifierImpl.java(306~315行目付近)の小さなファイルの処理と比較してください。大きなファイルの場合に、コンテンツソースの最終更新時刻(ミリ秒)がビルダーにコピーされているかを確認してください。B2FileContentSource からの大きなアップロードが、小さなファイルの場合と同様に、ファイル情報に src_last_modified_millis を含み、それを検証するテストがあれば完了です。

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

説明

What happens

For a small file, the SDK sends the content source's last-modified time as X-Bz-Info-src_last_modified_millis, and the README says the SDK adds this field on uploads. For a large file, B2StartLargeFileRequest.buildFrom copies the file info, sha1 and other settings but never reads the source's last-modified time, so the field is missing on large files uploaded through uploadLargeFile.

Where

core/src/main/java/com/backblaze/b2/client/structures/B2StartLargeFileRequest.java:125-157 (buildFrom); compare core/src/main/java/com/backblaze/b2/client/B2StorageClientWebifierImpl.java:306-315 (small file path) and README.md:36.

Why it matters

Impact: Wrong request or result (metadata silently missing), silent. Severity: High, because it happens on the normal path for every large upload whose content source provides a last-modified time, and the only workaround is setting src_last_modified_millis by hand through setCustomFields.

How to check

Found by reading the code, not reproduced. Upload a large file from a B2FileContentSource and read its file info: by reading, src_last_modified_millis is only set by the small-file path. In buildFrom, calling orig.getContentSource().getSrcLastModifiedMillisOrNull() and builder.setSrcLastModifiedMillisOrNull(...) when non-null would match the small-file behaviour.

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 を短くまとめたダイジェスト。