This is an automated email from the ASF dual-hosted git repository. gavinchou pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 1ef81ae16ec [opt](be/recycler) Add validator for ObjStorageClient RateLimiter config param (#48140) 1ef81ae16ec is described below commit 1ef81ae16ec1f6566a99d73a075d72b2c204a112 Author: Lei Zhang <zhang...@selectdb.com> AuthorDate: Tue Feb 25 23:58:48 2025 +0800 [opt](be/recycler) Add validator for ObjStorageClient RateLimiter config param (#48140) --- be/src/common/config.cpp | 8 ++++++++ cloud/src/common/config.h | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp index 2f4d7fdb7f1..6526061ff44 100644 --- a/be/src/common/config.cpp +++ b/be/src/common/config.cpp @@ -1298,11 +1298,19 @@ DEFINE_mInt32(s3_read_max_wait_time_ms, "800"); DEFINE_mBool(enable_s3_rate_limiter, "false"); DEFINE_mInt64(s3_get_bucket_tokens, "1000000000000000000"); +DEFINE_Validator(s3_get_bucket_tokens, [](int64_t config) -> bool { return config > 0; }); + DEFINE_mInt64(s3_get_token_per_second, "1000000000000000000"); +DEFINE_Validator(s3_get_token_per_second, [](int64_t config) -> bool { return config > 0; }); + DEFINE_mInt64(s3_get_token_limit, "0"); DEFINE_mInt64(s3_put_bucket_tokens, "1000000000000000000"); +DEFINE_Validator(s3_put_bucket_tokens, [](int64_t config) -> bool { return config > 0; }); + DEFINE_mInt64(s3_put_token_per_second, "1000000000000000000"); +DEFINE_Validator(s3_put_token_per_second, [](int64_t config) -> bool { return config > 0; }); + DEFINE_mInt64(s3_put_token_limit, "0"); DEFINE_String(trino_connector_plugin_dir, "${DORIS_HOME}/plugins/connectors"); diff --git a/cloud/src/common/config.h b/cloud/src/common/config.h index 359d087416c..c8a0eba3968 100644 --- a/cloud/src/common/config.h +++ b/cloud/src/common/config.h @@ -190,11 +190,16 @@ CONF_Bool(enable_retry_txn_conflict, "true"); CONF_mBool(enable_s3_rate_limiter, "false"); CONF_mInt64(s3_get_bucket_tokens, "1000000000000000000"); +CONF_Validator(s3_get_bucket_tokens, [](int64_t config) -> bool { return config > 0; }); + CONF_mInt64(s3_get_token_per_second, "1000000000000000000"); +CONF_Validator(s3_get_token_per_second, [](int64_t config) -> bool { return config > 0; }); CONF_mInt64(s3_get_token_limit, "0"); CONF_mInt64(s3_put_bucket_tokens, "1000000000000000000"); +CONF_Validator(s3_put_bucket_tokens, [](int64_t config) -> bool { return config > 0; }); CONF_mInt64(s3_put_token_per_second, "1000000000000000000"); +CONF_Validator(s3_put_token_per_second, [](int64_t config) -> bool { return config > 0; }); CONF_mInt64(s3_put_token_limit, "0"); // The secondary package name of the MetaService. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org