-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement](ObjectStorage) Retry when encountering TooManyRequest response #37199
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
TPC-H: Total hot run time: 39989 ms
|
TPC-DS: Total hot run time: 172722 ms
|
ClickBench: Total hot run time: 30.9 s
|
be/src/io/fs/s3_file_reader.cpp
Outdated
@@ -187,16 +139,10 @@ void S3FileReader::_collect_profile_before_close() { | |||
ADD_TIMER(_profile, s3_profile_name); | |||
RuntimeProfile::Counter* total_get_request_counter = | |||
ADD_CHILD_COUNTER(_profile, "TotalGetRequest", TUnit::UNIT, s3_profile_name); | |||
RuntimeProfile::Counter* too_many_request_err_counter = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not remove these profile items
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls retain the profile items
be/src/util/s3_util.cpp
Outdated
long attemptedRetries) const override { | ||
if (attemptedRetries < m_maxRetries && | ||
error.GetResponseCode() == Aws::Http::HttpResponseCode::TOO_MANY_REQUESTS) { | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should record something here if we are doing retry.
e.g. a retry counter or something useful for us to observe the status of requesting the object storage service.
be/src/io/fs/s3_file_reader.cpp
Outdated
} | ||
return Status::OK(); | ||
// clang-format off | ||
auto resp = client->get_object( { .bucket = _bucket, .key = _key, }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering create a new client with CustomRetryStrategy
which can carry enough context
such as number retires and duration of all retires.
run buildall |
TPC-H: Total hot run time: 40081 ms
|
TPC-DS: Total hot run time: 173745 ms
|
ClickBench: Total hot run time: 30.51 s
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
|
||
#pragma once | ||
|
||
#include <aws/core/client/AWSError.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'aws/core/client/AWSError.h' file not found [clang-diagnostic-error]
#include <aws/core/client/AWSError.h>
^
|
||
#pragma once | ||
|
||
#include <aws/core/client/AWSError.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'aws/core/client/AWSError.h' file not found [clang-diagnostic-error]
#include <aws/core/client/AWSError.h>
^
run beut |
run feut |
run cloudut |
run buildall |
TPC-H: Total hot run time: 40348 ms
|
TPC-DS: Total hot run time: 173237 ms
|
ClickBench: Total hot run time: 30.68 s
|
926d517
to
07ff178
Compare
run buildall |
1 similar comment
run buildall |
run buildall |
run buildall |
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…esponse (#37199) We can do retry for 429 using the embedded utility of corresponding sdk.
Proposed changes
We can do retry for 429 using the embedded utility of corresponding sdk.