-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[enhancement](filecache) fix default capacity and add reset_capacity validation #51711
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
Conversation
…validation originall default capacity is total disk size * ratio we user set zero or extrem large space than acutal disk. I found the ratio part make no sense. we just use total disk size in this case. I alse add validation for reset_capacity http action rather than set the raw capacity. Signed-off-by: zhengyu <zhangzhengyu@selectdb.com>
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
| ss << cache->reset_capacity(new_capacity); | ||
| for (auto& [p, cache] : _path_to_cache) { | ||
| int64_t valid_capacity; | ||
| ss << validate_capacity(p, new_capacity, valid_capacity); |
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.
if validate_capacity return error like "statfs error", we should not proceed.
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.
calling to reset_capacity() should fail
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.
not exactly. the operation will never fail. target capacity larger than the max disk capacity will be regulated to max disk capacity.
| if (auto iter = _path_to_cache.find(path); iter != _path_to_cache.end()) { | ||
| return iter->second->reset_capacity(new_capacity); | ||
| int64_t valid_capacity; | ||
| ss << validate_capacity(path, new_capacity, valid_capacity); |
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.
ditto
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.
explained above
TPC-H: Total hot run time: 34902 ms |
TPC-DS: Total hot run time: 197480 ms |
ClickBench: Total hot run time: 29.02 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Signed-off-by: zhengyu <zhangzhengyu@selectdb.com>
|
run buildall |
TPC-H: Total hot run time: 33997 ms |
TPC-DS: Total hot run time: 186359 ms |
ClickBench: Total hot run time: 29.86 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
dataroaring
left a comment
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
…validation (#51711) originall default capacity is total disk size * ratio we user set zero or extrem large space than acutal disk. I found the ratio part make no sense. we just use total disk size in this case. I alse add validation for reset_capacity http action rather than set the raw capacity. Signed-off-by: zhengyu <zhangzhengyu@selectdb.com>
…validation (#51711) originall default capacity is total disk size * ratio we user set zero or extrem large space than acutal disk. I found the ratio part make no sense. we just use total disk size in this case. I alse add validation for reset_capacity http action rather than set the raw capacity. Signed-off-by: zhengyu <zhangzhengyu@selectdb.com>
originall default capacity is total disk size * ratio we user set zero or extrem large space than acutal disk. I found the ratio part make no sense. we just use total disk size in this case.
I alse add validation for reset_capacity http action rather than set the raw capacity.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)