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

Chore/worker refacto #4057

Merged
merged 2 commits into from
Oct 4, 2024
Merged

Chore/worker refacto #4057

merged 2 commits into from
Oct 4, 2024

Conversation

loicmathieu
Copy link
Member

@loicmathieu loicmathieu commented Jun 17, 2024

Currently we use 2 thread for each worker job:

  • One thread of the main executorService which is used immediately after queue consumption to not block the queue. It also limit concurrency of job execution.
  • One thread to effectively execute the task or evaluate the trigger, this is needed to be able to interrupt it.

This PR keeps the first thread pool as we don't want to block the queue reception (or we will deadlock in JDBC), and we need to limit concurrency. But it then uses a virtual thread to execute the task / evaluate the trigger to reduce resource consumption and switch from the low level thread API to a Callable<State.Type>.

@loicmathieu loicmathieu force-pushed the chore/worker-refacto branch 3 times, most recently from 0f526a5 to 404d058 Compare June 17, 2024 09:39
@loicmathieu loicmathieu force-pushed the chore/worker-refacto branch 8 times, most recently from d402185 to 5a38dd4 Compare October 2, 2024 15:21
@loicmathieu loicmathieu marked this pull request as ready for review October 2, 2024 15:21
@loicmathieu loicmathieu force-pushed the chore/worker-refacto branch 2 times, most recently from 3737ce8 to 2e37bc2 Compare October 3, 2024 13:01
Copy link

sonarcloud bot commented Oct 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@loicmathieu loicmathieu merged commit 3e656cd into develop Oct 4, 2024
8 of 9 checks passed
@loicmathieu loicmathieu deleted the chore/worker-refacto branch October 4, 2024 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant