-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](filecache) reset_range dose not update shadow queue causing large cache size #59314
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
[fix](filecache) reset_range dose not update shadow queue causing large cache size #59314
Conversation
…ge cache size shadown queue is copying the actual LRU queue and provide lockless acess. but the copying loses updating size when actual LRU queue is reseting range (when load data, we first allocate 1MB block for the data and reset the size to the real size when finalizing). This commit does the following to fix this problem: 1. update the corresponding shadow queue element when resetting 2. calibrate size during initial loading into memory process Signed-off-by: zhengyu <[email protected]>
Signed-off-by: zhengyu <[email protected]>
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 36532 ms |
TPC-DS: Total hot run time: 180044 ms |
ClickBench: Total hot run time: 27.25 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run p0 |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run p0 |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run p0 |
|
run buildall |
|
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 34120 ms |
TPC-DS: Total hot run time: 174397 ms |
ClickBench: Total hot run time: 26.73 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
| iter->size = new_size; | ||
| queue.cache_size -= old_size; | ||
| queue.cache_size += new_size; | ||
| queue.resize(*cell->queue_iterator, new_size, cache_lock); |
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.
It is easily to map queue.resize to std::queue.resize.
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.
what does that mean? need to change to another name?
|
run buildall |
TPC-H: Total hot run time: 31813 ms |
TPC-DS: Total hot run time: 172970 ms |
ClickBench: Total hot run time: 26.64 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run p0 |
|
run vault_p0 |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
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
|
PR approved by at least one committer and no changes requested. |
shadown queue is copying the actual LRU queue and provide lockless acess. but the copying loses updating size when actual LRU queue is reseting range (when load data, we first allocate 1MB block for the data and reset the size to the real size when finalizing).
This commit does the following to fix this problem:
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)