-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Quartz thread discrepancy #32770
Comments
/cc @machi1990 (quartz), @mkouba (quartz) |
First of all, the different thread names don't mean that the job is not executed on a Vert.x worker thread. In Quarkus sometimes the Vert.x worker pool is backed by the default blocking thread pool ( The correct way to detect a Vert.x worker thread is to use the In any case, I did try to build and run your reproducer in native, JVM and dev mode and it behaves as expected and I did not observe the behavior described in #32621. |
Thank you for your reply. Is is really good to know about What really confuses me is that it makes it quite hard to properly "fine tune" thread pools in quarkus as I am never exactly sure what will be taken in effect for those; this quarkus.vertx.worker-pool-size vs quarkus.thread-pool.core-threads this quarkus.vertx.keep-alive-time vs quarkus.thread-pool.keep-alive-time For unless again there's something I am not grasping. |
Hum, I'm not sure that quarkus.vertx.worker-pool-size is used in this case, but I need to check. |
The |
Describe the bug
After this PR #28348 . Scheduled method are not running on a quartz thread anymore. I do not understand the full intent, but from what I understands, scheduled methods should work on a vertx worker thread so it can be using a duplicated context.
This does work in JVM mode, but in native it runs on a executor thread (not sure about duplicated context here), which led a bit to this in our application; #32621, which we is why I could not reproduce locally in dev mode (jvm) as it runs on the vertx worker threads.
Expected behavior
In both jvm and native. if
quarkus.quartz.run-blocking-scheduled-method-on-quartz-thread
is true. Quarkus should use quartz threads. OKIn both jvm and native if the above property is unset or false, scheduled methods should run on a vertx worker thread. NOK
Actual behavior
When running in jvm mode:
When running in native mode:
How to Reproduce?
Reproducer: https://github.com/manofthepeace/quarkus-thread-discrepancy
Steps to reproduce:
1- run the app in dev mode and look at the logs
2- compile native + run and observe the logs
Output of
uname -a
orver
Darwin Kernel Version 21.6.0
Output of
java -version
OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10
GraalVM version (if different from Java)
22.3.1
Quarkus version or git rev
2.16.6
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.7
Additional information
No response
The text was updated successfully, but these errors were encountered: