awslabs / aws-s3-transfer-manager-rs

Apache License 2.0
6 stars 1 forks source link

naive mpu #2

Closed aajtodd closed 2 months ago

aajtodd commented 2 months ago

Description of changes:

This PR completes a naive / strawman implementation of multipart upload.

Main components:

Future/Questions

  1. Checksums are ignored right now, we need a design around how we want checksums to work for both upload/download. I've tried to place TODO/FIXME comments where appropriate as it relates to this.
  2. Errors definitely need reworked at this point. In particular I've placed todo/fixme around completing an upload as we may end up with one or more part failures and possible a failure related to aborting the upload as well. How this gets exposed to the user needs some thought. Most likely we want to move towards defining an UploadError struct with different error "kinds" that capture various states/composite failures.
  3. Single part upload (content length < min part size) is not implemented yet.
  4. More tests around various scenarios (e.g. failed part, failed abort during processing a failed part, etc). I found using our experimental mocks package a bit tedious to setup, wondering if this is the direction to go still or not or if we have criteria for when to leverage this vs other testing strategies.
  5. Questions on when various upload request / response fields get set when splitting vs not splitting the request. Some of the fields only apply to one case or the other.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.