-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[branch-2.1](memory) Refactor LRU cache policy memory tracking #37658
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
[branch-2.1](memory) Refactor LRU cache policy memory tracking #37658
Conversation
Debug CacheManager::_caches unordered_map multithreaded visibility.
Fix apache#35590, CacheManager get CachePolicy should be used lock. Add LRUCachePolicyTrackingAllocator and LRUCachePolicyTrackingManual. tracking memory in LRUCachePolicy::insert, LRUCacheValueBase not need init mem_tracker, so not need to get CachePolicy under lock.
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
…ption (apache#35965) add conf enable_stacktrace_in_allocator_check_failed, if true, allocator check failed log stacktrace if not catch exception ``` I20240606 16:10:05.376622 3763531 allocator.cpp:109] Query:e35a88cfda634e66-b8664c46ff06b58a waiting for enough memory in thread id:140604421146368, maximum 1000ms, Allocator sys memory check failed: Cannot alloc:4096, consuming tracker:<Query#Id=e35a88cfda634e66-b8664c46 ff06b58a>, peak used 1178636808, current used 919127432, exec node:<>, process memory used 4.61 GB exceed limit 3.01 GB or sys available memory 145.57 GB less than low water mark 1.60 GB. Alloc Stacktrace: 0# Allocator<false, false, false>::sys_memory_check(unsigned long) const at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:1946 1# Allocator<false, false, false>::alloc_impl(unsigned long, unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/vec/common/allocator.cpp:197 2# doris::FunctionContext::FunctionContext() at /mnt/disk2/liyifan/doris/core/be/src/vec/common/arena.h:62 3# doris::FunctionContext::create_context(doris::RuntimeState*, doris::TypeDescriptor const&, std::vector<doris::TypeDescriptor, std::allocator<doris::TypeDescriptor> > const&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../ ../include/c++/11/bits/unique_ptr.h:155 4# doris::FunctionContext::clone() at /mnt/disk2/liyifan/doris/core/be/src/udf/udf.cpp:57 5# doris::vectorized::VExprContext::clone(doris::RuntimeState*, std::shared_ptr<doris::vectorized::VExprContext>&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/vector.tcc:112 6# doris::pipeline::PipelineXLocalState<doris::pipeline::FakeSharedState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492 7# doris::pipeline::ScanLocalState<doris::pipeline::OlapScanLocalState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492 8# doris::pipeline::PipelineTask::_open() at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:180 9# doris::pipeline::PipelineTask::execute(bool*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492 10# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:388 11# doris::ThreadPool::dispatch_thread() at /mnt/disk2/liyifan/doris/core/be/src/util/threadpool.cpp:0 12# doris::Thread::supervise_thread(void*) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../usr/include/pthread.h:562 13# start_thread 14# __clone ```
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
|
TeamCity be ut coverage result: |
pick
#36235
#35965