Skip to content

Commit c33c747

Browse files
committed
unrelated trivial: couple comments update
1 parent 9b5c295 commit c33c747

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

source/s3_auto_ranged_put.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,11 +1219,13 @@ static void s_s3_prepare_upload_part_finish(struct aws_s3_prepare_upload_part_jo
12191219
aws_s3_meta_request_lock_synced_data(meta_request);
12201220
struct aws_s3_mpu_part_info *part = NULL;
12211221
aws_array_list_get_at(&auto_ranged_put->synced_data.part_list, &part, request->part_number - 1);
1222+
/**
1223+
* 1. If request retries, get the checksum context from the previous attempt to reuse it. In case of the the
1224+
* request body in memory mangled
1225+
* 2. If this is the first attempt, the context is initialized from the previous prepare step.
1226+
**/
12221227
AWS_ASSERT(part != NULL && part->checksum_context != NULL);
1223-
/* Use checksum context if available, otherwise NULL for new parts */
12241228
checksum_context = part->checksum_context;
1225-
/* If checksum already calculated, it means either the part being retried or the part resumed from list
1226-
* parts. Keep reusing the old checksum in case of the request body in memory mangled */
12271229
aws_s3_meta_request_unlock_synced_data(meta_request);
12281230
}
12291231
/* END CRITICAL SECTION */

source/s3_checksum_context.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ struct aws_byte_cursor aws_s3_upload_request_checksum_context_get_checksum_curso
182182
return checksum_cursor;
183183
}
184184
s_lock_synced_data(context);
185-
/* If not previous calculated */
186185
if (context->synced_data.checksum_calculated) {
187186
checksum_cursor = aws_byte_cursor_from_buf(&context->synced_data.base64_checksum);
188187
}

0 commit comments

Comments
 (0)