File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff 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 */
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments