mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
Fix scheduler fairness test
This commit is contained in:
parent
9c4b15c1c1
commit
34cf2a1671
@ -282,7 +282,7 @@ struct ResourceTestManager : public ResourceTestBase
|
||||
return link_data[link];
|
||||
}
|
||||
|
||||
// Use at least two threads for each queue to avoid queue being deactivated:
|
||||
// Use exactly two threads for each queue to avoid queue being deactivated (happens with 1 thread) and reordering (happens with >2 threads):
|
||||
// while the first request is executing, the second request is in queue - holding it active.
|
||||
// use onEnqueue() and onExecute() functions for this purpose.
|
||||
void onEnqueue(ResourceLink link)
|
||||
|
@ -56,7 +56,7 @@ TEST(SchedulerDynamicResourceManager, Fairness)
|
||||
EXPECT_NEAR(cur_unfairness, 0, 1);
|
||||
};
|
||||
|
||||
constexpr size_t threads_per_queue = 3;
|
||||
constexpr size_t threads_per_queue = 2;
|
||||
int requests_per_thread = 100;
|
||||
ResourceTest t(2 * threads_per_queue + 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user