Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Create thread pool that blocks when full #2186

Merged
merged 2 commits into from
Mar 12, 2021
Merged

Conversation

ssalinas
Copy link
Member

So, the theory here, is that it will be much better to just block the producing thread (main rxjava thread carrying mesos events) when the status update queue is full than to throw a RejectedExecutionException and abort/restart/bai//etc. If we are falling behind on status updates it's nearly always the case that those have to catch up first before we can do anything else.

Java-y bits added here are a custom ThreadPoolQueue which, because it delegates to put, will block on the put to the underlying queue when full instead of throwing the reject exception

@rosalind210
Copy link
Contributor

🚢

@ssalinas ssalinas merged commit 74b7e8f into master Mar 12, 2021
@ssalinas ssalinas deleted the status_queue_offload branch March 12, 2021 15:25
@ssalinas ssalinas added this to the 1.5.0 milestone May 4, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants