Skip to content

Commit 8765fe9

Browse files
authored
fix active_set bug in min tso scheduler (#7693) (#7709)
close #7692
1 parent c7255f7 commit 8765fe9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dbms/src/Flash/Mpp/MinTSOScheduler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ bool MinTSOScheduler::scheduleImp(const UInt64 tso, const MPPQueryTaskSetPtr & q
186186
{
187187
auto needed_threads = task->getNeededThreads();
188188
auto check_for_new_min_tso = tso <= min_tso && estimated_thread_usage + needed_threads <= thread_hard_limit;
189-
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);
189+
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);
190190
if (check_for_new_min_tso || check_for_not_min_tso)
191191
{
192192
updateMinTSO(tso, false, isWaiting ? "from the waiting set" : "when directly schedule it");

0 commit comments

Comments
 (0)