[fix](cloud) fix file cache potential leakage#46561
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
13739c8 to
272ecea
Compare
|
run buildall |
TPC-H: Total hot run time: 32805 ms |
TPC-DS: Total hot run time: 195212 ms |
ClickBench: Total hot run time: 31.72 s |
|
run p0 |
1 similar comment
|
run p0 |
1a55a0a to
c70b01d
Compare
|
run buildall |
TPC-H: Total hot run time: 32575 ms |
TPC-DS: Total hot run time: 196353 ms |
ClickBench: Total hot run time: 31.05 s |
|
run beut |
|
run buildall |
2ead512 to
f0ce039
Compare
|
run buildall |
1 similar comment
|
run buildall |
TPC-H: Total hot run time: 32961 ms |
TPC-DS: Total hot run time: 195635 ms |
ClickBench: Total hot run time: 31.63 s |
df8f75e to
d734743
Compare
|
run buildall |
TPC-H: Total hot run time: 32917 ms |
TPC-DS: Total hot run time: 195071 ms |
ClickBench: Total hot run time: 31.43 s |
TPC-H: Total hot run time: 32500 ms |
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 194278 ms |
ClickBench: Total hot run time: 30.66 s |
|
run buildall |
|
TeamCity be ut coverage result: |
|
run external |
|
run performance |
TPC-H: Total hot run time: 32215 ms |
TPC-DS: Total hot run time: 193427 ms |
ClickBench: Total hot run time: 30.03 s |
|
PR approved by at least one committer and no changes requested. |
| int64_t duration_ns = 0; | ||
| SCOPED_RAW_TIMER(&duration_ns); | ||
| Status st = _storage->remove(key); | ||
| *_storage_async_remove_latency << duration_ns; |
There was a problem hiding this comment.
microseconds is enough, and easy to keep consistent with existing latency unit
There was a problem hiding this comment.
microseconds is enough, and easy to keep consistent with existing latency unit
OK, another monitor PR is on the way. Do it later.
| void BlockFileCache::run_background_gc() { | ||
| FileCacheKey key; | ||
| static const size_t interval_ms = 100; | ||
| const size_t batch_limit = config::file_cache_remove_block_qps_limit * interval_ms / 1000; |
There was a problem hiding this comment.
- should move into while loop to be dynamically configurable
- interval_ms set to interval_us = 1000us
const size_t batch_limit = std::max(config::file_cache_remove_block_qps_limit * (interval_us / 1000000.0), 1); - single thread IO bottleneck
- corner cases: upper bound and lower bound
将原来的 同步/异步删除 cache meta + 同步/异步删除 cache data file 多维度的删除策略降维简化: 所有 cache meta 都是同步删除(除正在使用,此case处理方式见下文),data file在 critical 场景同步删除、gc 场景下异步删除
异步清理调度的优化:
优化标记删除:
fix 删除正在引用的数据过程的多处泄漏:
发现并修复队列操作中存在的内存写飞隐患
其它小优化:
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)