Skip to content

Commit

Permalink
only spill largest task
Browse files Browse the repository at this point in the history
  • Loading branch information
Doris-Extras committed Oct 2, 2024
1 parent d8f61b5 commit 043c0d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 5 additions & 3 deletions be/src/runtime/query_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,11 @@ Status QueryContext::revoke_memory() {
chosen_tasks.emplace_back(task);

revoked_size += revocable_size;
if (revoked_size >= target_revoking_size) {
break;
}
// Only revoke the largest task to ensure memory is used as much as possible
break;
//if (revoked_size >= target_revoking_size) {
// break;
//}
}

std::weak_ptr<QueryContext> this_ctx = shared_from_this();
Expand Down
2 changes: 0 additions & 2 deletions be/src/runtime/workload_group/workload_group_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,6 @@ void WorkloadGroupMgr::update_queries_limit(WorkloadGroupPtr wg, bool enable_har
int64_t expected_query_weighted_mem_limit = 0;
// If the query enable hard limit, then it should not use the soft limit
if (query_ctx->enable_query_slot_hard_limit()) {
LOG(INFO) << "query info " << wg_high_water_mark_except_load << ","
<< query_ctx->get_slot_count() << "," << total_slot_count;
if (total_slot_count < 1) {
LOG(WARNING)
<< "query " << print_id(query_ctx->query_id())
Expand Down

0 comments on commit 043c0d5

Please sign in to comment.