Skip to content

Commit

Permalink
instead of skipping, let's prepare the parts and mark it noop (#356)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Graeb <graebm@amazon.com>
  • Loading branch information
TingDaoK and graebm authored Oct 16, 2023
1 parent 0f751ea commit f710806
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 367 deletions.
13 changes: 0 additions & 13 deletions include/aws/s3/private/s3_auto_ranged_put.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,6 @@ struct aws_s3_auto_ranged_put {
uint32_t next_part_number;
} threaded_update_data;

/*
* Should only be used during prepare requests. Note: stream reads must be sequential,
* so prepare currently never runs concurrently with another prepare
*/
struct {
/*
* Start index of skipping parts.
* This is used to keep track of how many parts have been read from input steam and where to try to start
* skipping parts from.
*/
uint32_t part_index_for_skipping;
} prepare_data;

/* Members to only be used when the mutex in the base type is locked. */
struct {
/* Array list of `struct aws_s3_mpu_part_info *`
Expand Down
1 change: 1 addition & 0 deletions include/aws/s3/private/s3_meta_request_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ struct aws_s3_mpu_part_info {
uint64_t size;
struct aws_string *etag;
struct aws_byte_buf checksum_base64;
bool was_previously_uploaded;
};

AWS_EXTERN_C_BEGIN
Expand Down
3 changes: 3 additions & 0 deletions include/aws/s3/private/s3_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ struct aws_s3_request {
* requests for uploading data after the end of the stream (those requests
* will use below flag to indicate that they should not be sent). */
uint32_t is_noop : 1;

/* When true, this request has already been uploaded. we still prepare the request to check the durability. */
uint32_t was_previously_uploaded : 1;
};

AWS_EXTERN_C_BEGIN
Expand Down
Loading

0 comments on commit f710806

Please sign in to comment.