-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
(cloud-merge) Check the cache config size whether is larger than disk_resource_limit_mode_percent #34137
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
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
@@ -80,10 +80,13 @@ Status FileCacheFactory::create_file_cache(const std::string& cache_base_path, | |||
LOG_ERROR("").tag("file cache path", cache_base_path).tag("error", strerror(errno)); | |||
return Status::IOError("{} statfs error {}", cache_base_path, strerror(errno)); | |||
} | |||
size_t disk_total_size = static_cast<size_t>(stat.f_blocks) * static_cast<size_t>(stat.f_bsize); | |||
size_t disk_total_size = static_cast<size_t>(static_cast<size_t>(stat.f_blocks) * static_cast<size_t>(stat.f_bsize) |
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: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
size_t disk_total_size = static_cast<size_t>(static_cast<size_t>(stat.f_blocks) * static_cast<size_t>(stat.f_bsize) | |
auto disk_total_size = static_cast<size_t>(static_cast<size_t>(stat.f_blocks) * static_cast<size_t>(stat.f_bsize) |
run buildall |
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
@@ -80,10 +80,15 @@ Status FileCacheFactory::create_file_cache(const std::string& cache_base_path, | |||
LOG_ERROR("").tag("file cache path", cache_base_path).tag("error", strerror(errno)); | |||
return Status::IOError("{} statfs error {}", cache_base_path, strerror(errno)); | |||
} | |||
size_t disk_total_size = static_cast<size_t>(stat.f_blocks) * static_cast<size_t>(stat.f_bsize); | |||
size_t disk_total_size = static_cast<size_t>( |
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: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
size_t disk_total_size = static_cast<size_t>( | |
auto disk_total_size = static_cast<size_t>( |
run buildall |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 40691 ms
|
TPC-DS: Total hot run time: 187381 ms
|
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.
Remove unused code.
run buildall |
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
if (disk_total_size < file_cache_settings.capacity) { | ||
file_cache_settings = get_file_cache_settings(size_t(disk_total_size * 0.9), | ||
file_cache_settings.max_query_cache_size); | ||
size_t disk_capacity = static_cast<size_t>( |
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: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
size_t disk_capacity = static_cast<size_t>( | |
auto disk_capacity = static_cast<size_t>( |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 41044 ms
|
TPC-DS: Total hot run time: 185957 ms
|
PR approved by anyone and no changes requested. |
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.
LGTM
PR approved by at least one committer and no changes requested. |
…_resource_limit_mode_percent (apache#34137)
…_resource_limit_mode_percent (apache#34137)
Proposed changes
Issue Number: close #xxx
2978
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...