You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(transfer): converge B2 large-file upload on shared part engine
Introduce run_concurrent_part_upload in providers/multi_thread.rs: the
upload-side mirror of the shared concurrent-range download engine. It
plans fixed-size parts over a local file (plan_fixed_size_parts: only
the last part may be shorter, part size grown to respect the 10000-part
protocol cap), reads each part on demand after a slot frees so peak RAM
stays bounded to max_parallel * part_size, uploads with a true sliding
window (a freed slot starts the next part, no per-batch barrier),
aggregates progress, is cancellable, and aborts every sibling on the
first error. The transport-specific part is a single closure returning
the provider's part identifier; the engine returns them sorted, ready
for the finalising call.
Converge B2 upload_large_file from a sequential single-URL loop onto
this engine. B2 requires an independent upload-part-URL per in-flight
part, so the closure acquires one per slot. Session lifecycle stays in
the provider, so the failure path is unchanged. B2 now advertises the
multipart capability honestly (supports_multipart, parallel parts);
the download path stays single-stream so no range capability is
overclaimed.
S3's native multipart path is deliberately left untouched: it is
already live-validated byte-identical and converging it would risk
regressing a proven path for no measured gain (tracked, not done here:
the same no-churn-on-a-validated-path principle the download side
applied to S3's native range path).
Add six unit tests for the part planner (even split, uneven final
part, zero inputs, protocol-cap part growth, single part, B2-realistic
sizing) and a live B2 round-trip test asserting honest capability
advertisement plus byte-identical reassembly with an uneven final part.
Co-Authored-By: aeroftp[bot] <aeroftp[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments