gavinchou commented on code in PR #59465:
URL: https://github.com/apache/doris/pull/59465#discussion_r2692978198
##########
be/src/util/s3_util.cpp:
##########
@@ -204,6 +207,13 @@ std::shared_ptr<io::ObjStorageClient>
S3ClientFactory::create(const S3ClientConf
return nullptr;
}
+ DEFER({
Review Comment:
why we need to user defer?
and it is better to reset rate limiter iff any related config changed.
e.g. we can use static (atomic) variables to record last changed values for
comparision
```
static atomic<int64> last_s3_get_token_per_second = 0;
...
if (last_s3_get_token_per_second != config::s3_get_token_per_second
|| x != y) {
reset_rate_limit(...);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]