Skip to content

Commit f6c3d9b

Browse files
committed
1
1 parent 60e4eef commit f6c3d9b

File tree

3 files changed

+1799
-3
lines changed

3 files changed

+1799
-3
lines changed

be/src/io/fs/s3_obj_storage_client.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,6 @@ ObjectStorageHeadResponse S3ObjStorageClient::head_object(const ObjectStoragePat
311311
static_cast<int>(outcome.GetError().GetResponseCode()),
312312
outcome.GetError().GetRequestId()}};
313313
}
314-
return ObjectStorageHeadResponse {
315-
.resp = ObjectStorageResponse::OK(),
316-
};
317314
}
318315

319316
ObjectStorageResponse S3ObjStorageClient::get_object(const ObjectStoragePathOptions& opts,
@@ -334,6 +331,8 @@ ObjectStorageResponse S3ObjStorageClient::get_object(const ObjectStoragePathOpti
334331
outcome.GetError().GetRequestId()};
335332
}
336333
*size_return = outcome.GetResult().GetContentLength();
334+
// case for incomplete read
335+
SYNC_POINT_CALLBACK("s3_obj_storage_client::get_object", size_return);
337336
if (*size_return != bytes_read) {
338337
return {convert_to_obj_response(Status::InternalError(
339338
"failed to read from {}(bytes read: {}, bytes req: {}), request_id: {}",
@@ -405,6 +404,8 @@ ObjectStorageResponse S3ObjStorageClient::delete_objects(const ObjectStoragePath
405404
static_cast<int>(delete_outcome.GetError().GetResponseCode()),
406405
delete_outcome.GetError().GetRequestId()};
407406
}
407+
// case for partial delete object failure
408+
SYNC_POINT_CALLBACK("s3_obj_storage_client::delete_objects", &delete_outcome);
408409
if (!delete_outcome.GetResult().GetErrors().empty()) {
409410
const auto& e = delete_outcome.GetResult().GetErrors().front();
410411
return {convert_to_obj_response(
@@ -470,6 +471,9 @@ ObjectStorageResponse S3ObjStorageClient::delete_objects_recursively(
470471
static_cast<int>(delete_outcome.GetError().GetResponseCode()),
471472
delete_outcome.GetError().GetRequestId()};
472473
}
474+
// case for partial delete object failure
475+
SYNC_POINT_CALLBACK("s3_obj_storage_client::delete_objects_recursively",
476+
&delete_outcome);
473477
if (!delete_outcome.GetResult().GetErrors().empty()) {
474478
const auto& e = delete_outcome.GetResult().GetErrors().front();
475479
return {convert_to_obj_response(Status::InternalError(

be/src/util/s3_util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ extern bvar::LatencyRecorder s3_copy_object_latency;
6262
}; // namespace s3_bvar
6363

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

6667
class S3URI;
6768
struct S3ClientConf {

0 commit comments

Comments
 (0)