-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flaky SEPExecutor.changingMaxWorkersMeetsConcurrencyGoalsTest
Thread scheduling is not guaranteed to be fair and having the BusyWork tasks reschedule itself makes sure there is always more work for the SEPWorker once it finishes, so it can hog all the CPU if run with a low number of cores. To randomize the scheduling better, introduce a second thread that keeps the executor primed with work, but guarantees a thread switch by waiting on the sempahore. Also resolves a cleanup bug - the sharedPool was not being shutdown correctly. Patch by Jon Meredith; reviewed by David Capwell and Dinesh Joshi for CASSANDRA-15709
- Loading branch information
1 parent
0a860b9
commit f9ddaf1
Showing
1 changed file
with
52 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters