Skip to content
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

Do not block pushing jobs during config reload #44

Merged
merged 1 commit into from
Nov 21, 2019
Merged

Conversation

tarao
Copy link
Member

@tarao tarao commented Nov 20, 2019

Problem

When queues are reloaded (by changing a queue config), a new job is accepted by the HTTP server but blocked by Service until the whole reloading process completes. Especially, stopping dispatchers will take long because they wait for workers to respond.

How to solve

Accept new jobs during stopping dispatchers. It is safe to push a new job even if no dispatcher is running.

Change summary

  • Separate the process to stop dispatchers from destroyQueues as deactivateQueues.
  • Introduce a new mutex for pushing jobs which won't be locked by the deactivation.

Separate the process to stop dispatchers from `destroyQueues`
as `deactivateQueues` and introduce a new mutex for pushing jobs
which won't be locked by the deactivation.
@itchyny
Copy link
Contributor

itchyny commented Nov 21, 2019

LGTM!

@tarao tarao merged commit bd25875 into master Nov 21, 2019
@tarao tarao deleted the nonblocking-reload branch November 21, 2019 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants