New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BoundedElasticScheduler does not invoke any tasks after interruption. #1973
Comments
Hi @jacekmg and thanks for the report. I was unable to reproduce the issue, that last task with Note that since the disposal of tasks inside the (As a side note, the unit test was not entirely useful because it relies on logging rather than capturing state (eg. in |
I've experienced the same issue on first glance it looks like race condition when disposing ActiveWroker/DefferedWorker, which results in worker threads not beeing released to idle pool when cancel is called on scheduled tasks my test case :
on my machine it always ends with |
When the active worker becomes inactive and picks a deferred worker to serve, but at the same time that deferred worker is cancelled or disposed, the later can be gone from the parent's pool (due to the former polling). The issue is that the decrementing of REMAINING_TASK was guarded by a successful removal of the deferred worker from the parent, which in the race is already removed and thus returns false. The decrement must be done unconditionally at this step to fix the issue.
also verified to be fixed by the new implementation in #2040 |
I've stumbled upon a problem with BoundedElasticScheduler when there's high traffic creating many queued task on it. Invoking dispose() on scheduled tasks seems to break scheduler, to the point where it is not invoking any new tasks.
Expected Behavior
Scheduler should correctly invoke tasks, after disposing all of its other tasks.
Actual Behavior
Scheduler doesn't do anything after disposing all of its tasks, and scheduling a new one.
Steps to Reproduce
In the following example, behavior is as follows:
##Environment
The text was updated successfully, but these errors were encountered: