Large file uploads do not send src_last_modified_millis like small uploads do
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 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 小时
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Backblaze/b2-sdk-java 的其他 Issue
-
难度 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 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
Backblaze/b2-sdk-java#241 ·
维护者通常 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 天内回复