yiguolei commented on code in PR #45743: URL: https://github.com/apache/doris/pull/45743#discussion_r1896438342
########## be/src/olap/memtable_flush_executor.cpp: ########## @@ -150,10 +181,18 @@ Status FlushToken::_do_flush_memtable(MemTable* memtable, int32_t segment_id, in SCOPED_ATTACH_TASK(memtable->query_thread_context()); signal::set_signal_task_id(_rowset_writer->load_id()); signal::tablet_id = memtable->tablet_id(); + + DEFER_RELEASE_RESERVED(); + { SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER( memtable->query_thread_context().query_mem_tracker->write_tracker()); SCOPED_CONSUME_MEM_TRACKER(memtable->mem_tracker()); + auto reserve_size = memtable->get_flush_reserve_memory_size(); Review Comment: 由于在188 行有一个scope switch了,所以185 行那个defer release 就不对了。 因为192 行作用在188 那个memtracker 上了,但是释放的时候就到了181 行。 -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org