VividByteWorker commented on code in PR #63110:
URL: https://github.com/apache/doris/pull/63110#discussion_r3252612986


##########
be/src/load/memtable/memtable_flush_executor.cpp:
##########
@@ -262,10 +388,54 @@ void 
FlushToken::_flush_memtable(std::shared_ptr<MemTable> memtable_ptr, int32_t
 
     MonotonicStopWatch timer;
     timer.start();
-    size_t memory_usage = memtable_ptr->memory_usage();
+    size_t memory_usage = memtable->memory_usage();
 
-    int64_t flush_size;
-    Status s = _do_flush_memtable(memtable_ptr.get(), segment_id, &flush_size);
+    int64_t flush_size = 0;
+    Status s;
+    memtable->update_mem_type(MemType::FLUSH);
+    int64_t duration_ns = 0;
+    {
+        s = [&]() {
+            SCOPED_RAW_TIMER(&duration_ns);
+            SCOPED_ATTACH_TASK(memtable->resource_ctx());
+            SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(
+                    
memtable->resource_ctx()->memory_context()->mem_tracker()->write_tracker());
+            SCOPED_CONSUME_MEM_TRACKER(memtable->mem_tracker());
+
+            // DEFER_RELEASE_RESERVED();
+
+            // auto reserve_size = memtable->get_flush_reserve_memory_size();

Review Comment:
   remove these comments



-- 
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