Skip to content

Commit

Permalink
fix active_set bug in min tso scheduler (#7693) (#7709)
Browse files Browse the repository at this point in the history
close #7692
  • Loading branch information
ti-chi-bot authored Jun 28, 2023
1 parent c7255f7 commit 8765fe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbms/src/Flash/Mpp/MinTSOScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ bool MinTSOScheduler::scheduleImp(const UInt64 tso, const MPPQueryTaskSetPtr & q
{
auto needed_threads = task->getNeededThreads();
auto check_for_new_min_tso = tso <= min_tso && estimated_thread_usage + needed_threads <= thread_hard_limit;
auto check_for_not_min_tso = (active_set.size() < active_set_soft_limit || tso <= *active_set.rbegin()) && (estimated_thread_usage + needed_threads <= thread_soft_limit);
auto check_for_not_min_tso = (active_set.size() < active_set_soft_limit || active_set.find(tso) != active_set.end()) && (estimated_thread_usage + needed_threads <= thread_soft_limit);
if (check_for_new_min_tso || check_for_not_min_tso)
{
updateMinTSO(tso, false, isWaiting ? "from the waiting set" : "when directly schedule it");
Expand Down

0 comments on commit 8765fe9

Please sign in to comment.