This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 10ad2551985 branch-2.1: [fix](memory) Fix purge jemalloc dirty page (#46146) 10ad2551985 is described below commit 10ad255198577945ff1bf1225c99233c5bf66c47 Author: Xinyi Zou <zouxi...@selectdb.com> AuthorDate: Mon Dec 30 20:00:54 2024 +0800 branch-2.1: [fix](memory) Fix purge jemalloc dirty page (#46146) ### What problem does this PR solve? Fix purge jemalloc dirty page --- be/src/common/daemon.cpp | 7 +++++-- be/src/runtime/memory/mem_tracker_limiter.cpp | 4 ---- be/src/runtime/memory/mem_tracker_limiter.h | 3 +++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/be/src/common/daemon.cpp b/be/src/common/daemon.cpp index 84572968850..fe842c1654f 100644 --- a/be/src/common/daemon.cpp +++ b/be/src/common/daemon.cpp @@ -368,16 +368,19 @@ void Daemon::je_purge_dirty_pages_thread() const { std::unique_lock<std::mutex> l(doris::MemInfo::je_purge_dirty_pages_lock); while (_stop_background_threads_latch.count() != 0 && !doris::MemInfo::je_purge_dirty_pages_notify.load(std::memory_order_relaxed)) { - doris::MemInfo::je_purge_dirty_pages_cv.wait_for(l, std::chrono::seconds(1)); + doris::MemInfo::je_purge_dirty_pages_cv.wait_for(l, std::chrono::milliseconds(100)); } if (_stop_background_threads_latch.count() == 0) { break; } + + Defer defer {[&]() { + doris::MemInfo::je_purge_dirty_pages_notify.store(false, std::memory_order_relaxed); + }}; if (config::disable_memory_gc) { continue; } doris::MemInfo::je_purge_all_arena_dirty_pages(); - doris::MemInfo::je_purge_dirty_pages_notify.store(false, std::memory_order_relaxed); } while (true); } diff --git a/be/src/runtime/memory/mem_tracker_limiter.cpp b/be/src/runtime/memory/mem_tracker_limiter.cpp index 63391203c5d..6fefc1b7684 100644 --- a/be/src/runtime/memory/mem_tracker_limiter.cpp +++ b/be/src/runtime/memory/mem_tracker_limiter.cpp @@ -631,8 +631,6 @@ int64_t MemTrackerLimiter::free_top_memory_query( while (!min_pq.empty()) { TUniqueId cancelled_queryid = label_to_queryid(min_pq.top().second); if (cancelled_queryid == TUniqueId()) { - LOG(WARNING) << log_prefix - << "Task ID parsing failed, label: " << min_pq.top().second; min_pq.pop(); continue; } @@ -752,8 +750,6 @@ int64_t MemTrackerLimiter::free_top_overcommit_query( while (!max_pq.empty()) { TUniqueId cancelled_queryid = label_to_queryid(max_pq.top().second); if (cancelled_queryid == TUniqueId()) { - LOG(WARNING) << log_prefix - << "Task ID parsing failed, label: " << max_pq.top().second; max_pq.pop(); continue; } diff --git a/be/src/runtime/memory/mem_tracker_limiter.h b/be/src/runtime/memory/mem_tracker_limiter.h index c8a8c845793..6ff0d56b02b 100644 --- a/be/src/runtime/memory/mem_tracker_limiter.h +++ b/be/src/runtime/memory/mem_tracker_limiter.h @@ -199,6 +199,9 @@ public: auto queryid = split(label, "#Id=")[1]; TUniqueId querytid; parse_id(queryid, &querytid); + if (querytid == TUniqueId()) { + LOG(WARNING) << "Task ID parsing failed, label: " << label; + } return querytid; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org