Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Dec 8, 2023
1 parent 6119029 commit 5b6394c
Showing 1 changed file with 0 additions and 66 deletions.
66 changes: 0 additions & 66 deletions source/s3_auto_ranged_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,72 +218,6 @@ static bool s_s3_auto_ranged_get_update(
}
request->discovers_object_size = true;
goto has_work_remaining;
// bool headObjectRequired = auto_ranged_get->initial_message_has_range_header != 0;
// headObjectRequired =
// headObjectRequired ||
// (meta_request->checksum_config.validate_response_checksum &&
// (auto_ranged_get->size_hint == 0 || auto_ranged_get->size_hint > meta_request->part_size));
// /* If there exists a range header, we currently always do a head request first. For the range header
// * value could be parsed client-side, doing so presents a number of complications. For example, the
// * given range could be an unsatisfiable range, and might not even specify a complete range. To keep
// * things simple, we are currently relying on the service to handle turning the Range header into a
// * Content-Range response header.*/
// if (headObjectRequired) {
// // TODO: align the first part

// } else {
// /* Get the object range from the first request */

// if (meta_request->checksum_config.validate_response_checksum) {
// /*
// * Discover the size of the object while attempting to retrieve the first part. We use
// * getFirstPart instead of a ranged get to do checksum validation for objects not uploaded
// * via MPU. If the first part is not equal to the part_size, we cancel the request
// * upon receiving the headers, which is similar to a head request. This approach helps to
// avoid
// * an extra head request for small files.
// */
// struct aws_s3_buffer_pool_ticket *ticket =
// aws_s3_buffer_pool_reserve(meta_request->client->buffer_pool, meta_request->part_size);

// if (ticket == NULL) {
// goto has_work_remaining;
// }

// request = aws_s3_request_new(
// meta_request,
// AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_PART_NUMBER,
// AWS_S3_REQUEST_TYPE_GET_OBJECT,
// 1 /*part_number*/,
// AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS |
// AWS_S3_REQUEST_FLAG_PART_SIZE_RESPONSE_BODY);
// request->ticket = ticket;
// auto_ranged_get->synced_data.get_first_part_sent = true;
// } else {
// /* If checksum validation is not required, then discover the size of the object during the
// * first ranged get request. */
// struct aws_s3_buffer_pool_ticket *ticket =
// aws_s3_buffer_pool_reserve(meta_request->client->buffer_pool, meta_request->part_size);

// if (ticket == NULL) {
// goto has_work_remaining;
// }

// request = aws_s3_request_new(
// meta_request,
// AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE,
// AWS_S3_REQUEST_TYPE_GET_OBJECT,
// 1 /*part_number*/,
// AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS |
// AWS_S3_REQUEST_FLAG_PART_SIZE_RESPONSE_BODY);
// request->part_range_start = 0;
// request->part_range_end = meta_request->part_size - 1; /* range-end is inclusive */
// request->ticket = ticket;
// }
// request->discovers_object_size = true;
// }

// goto has_work_remaining;
}

/* If the object range is known and that range is empty, then we have an empty file to request. */
Expand Down

0 comments on commit 5b6394c

Please sign in to comment.