Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion be/src/io/fs/azure_obj_storage_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ ObjectStorageUploadResponse AzureObjStorageClient::upload_part(const ObjectStora
// The blockId must be base64 encoded
s3_put_rate_limit([&]() {
SCOPED_BVAR_LATENCY(s3_bvar::s3_multi_part_upload_latency);
client.StageBlock(base64_encode_part_num(part_num), memory_body);
return client.StageBlock(base64_encode_part_num(part_num), memory_body);
});
} catch (Azure::Core::RequestFailedException& e) {
auto msg = fmt::format(
Expand Down
10 changes: 7 additions & 3 deletions be/src/io/fs/s3_obj_storage_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,6 @@ ObjectStorageHeadResponse S3ObjStorageClient::head_object(const ObjectStoragePat
static_cast<int>(outcome.GetError().GetResponseCode()),
outcome.GetError().GetRequestId()}};
}
return ObjectStorageHeadResponse {
.resp = ObjectStorageResponse::OK(),
};
}

ObjectStorageResponse S3ObjStorageClient::get_object(const ObjectStoragePathOptions& opts,
Expand All @@ -334,6 +331,8 @@ ObjectStorageResponse S3ObjStorageClient::get_object(const ObjectStoragePathOpti
outcome.GetError().GetRequestId()};
}
*size_return = outcome.GetResult().GetContentLength();
// case for incomplete read
SYNC_POINT_CALLBACK("s3_obj_storage_client::get_object", size_return);
if (*size_return != bytes_read) {
return {convert_to_obj_response(Status::InternalError(
"failed to read from {}(bytes read: {}, bytes req: {}), request_id: {}",
Expand Down Expand Up @@ -405,6 +404,8 @@ ObjectStorageResponse S3ObjStorageClient::delete_objects(const ObjectStoragePath
static_cast<int>(delete_outcome.GetError().GetResponseCode()),
delete_outcome.GetError().GetRequestId()};
}
// case for partial delete object failure
SYNC_POINT_CALLBACK("s3_obj_storage_client::delete_objects", &delete_outcome);
if (!delete_outcome.GetResult().GetErrors().empty()) {
const auto& e = delete_outcome.GetResult().GetErrors().front();
return {convert_to_obj_response(
Expand Down Expand Up @@ -470,6 +471,9 @@ ObjectStorageResponse S3ObjStorageClient::delete_objects_recursively(
static_cast<int>(delete_outcome.GetError().GetResponseCode()),
delete_outcome.GetError().GetRequestId()};
}
// case for partial delete object failure
SYNC_POINT_CALLBACK("s3_obj_storage_client::delete_objects_recursively",
&delete_outcome);
if (!delete_outcome.GetResult().GetErrors().empty()) {
const auto& e = delete_outcome.GetResult().GetErrors().front();
return {convert_to_obj_response(Status::InternalError(
Expand Down
1 change: 1 addition & 0 deletions be/src/util/s3_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ extern bvar::LatencyRecorder s3_copy_object_latency;
}; // namespace s3_bvar

std::string hide_access_key(const std::string& ak);
int reset_s3_rate_limiter(S3RateLimitType type, size_t max_speed, size_t max_burst, size_t limit);

class S3URI;
struct S3ClientConf {
Expand Down
Loading
Loading