nsivarajan commented on code in PR #62739:
URL: https://github.com/apache/doris/pull/62739#discussion_r3139266634


##########
be/src/common/daemon.cpp:
##########
@@ -507,6 +508,12 @@ void Daemon::je_reset_dirty_decay_thread() const {
 }
 
 void Daemon::cache_adjust_capacity_thread() {
+    // Attach a tracker so Block/Column destructors triggered by LRU eviction
+    // do not hit the memory_orphan_check DCHECK.
+    auto mem_tracker = 
MemTrackerLimiter::create_shared(MemTrackerLimiter::Type::GLOBAL,

Review Comment:
   Thanks for the analysis. You're right — my original fix attached a generic 
tracker to the daemon thread(fixing symptom) , which prevented the DCHECK but 
caused Block memory to be deducted from the wrong tracker instead of 
query_cache_mem_tracker.
   
   updated with suggested correct fix, to override adjust_capacity_weighted, 
reset_initial_capacity and prune_stale in QueryCache with 
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER, so Block destructors during any 
eviction path always charge the right tracker. Reverted the daemon.cpp change 
accordingly.
   
   Please take another look.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to