wenzhenghu commented on issue #56104:
URL: https://github.com/apache/doris/issues/56104#issuecomment-3404331104

   Based on the latest master code implementation, 
MemoryReclamation::revoke_tasks_memoryis responsible for reclaiming memory used 
by SQL queries. It filters SQL queries based on the input filters, which 
includes filtering out queries with memory consumption less than 32MB.
   ```
   int64_t MemoryReclamation::revoke_tasks_memory(
           int64_t need_free_mem, const 
std::vector<std::shared_ptr<ResourceContext>>& resource_ctxs,
           const std::string& revoke_reason, RuntimeProfile* profile, 
PriorityCmpFunc priority_cmp,
           std::vector<FilterFunc> filters, ActionFunc action) {
   ---
               for (auto filter : filters) {
                   if (!FilterFuncImpl[filter](resource_ctx.get())) {
                       is_filtered = true;
                       break;
                   }
               }
               if (is_filtered) {
                   continue;
               }
   ---
   {FilterFunc::EXCLUDE_IS_SMALL,
    [](ResourceContext* resource_ctx) {
        return resource_ctx->memory_context()->current_memory_bytes() > 
SMALL_MEMORY_TASK;
    }}
   ```


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