From 100266c6f717f1a955f25f2aafd730e261b375fd Mon Sep 17 00:00:00 2001 From: Francesco Nigro Date: Wed, 2 Oct 2024 11:50:21 +0200 Subject: [PATCH 1/2] Bump jboss-threads version to 3.8.0.Final and disable queue size tracking --- bom/application/pom.xml | 2 +- core/builder/src/main/java/io/quarkus/builder/Execution.java | 1 + .../src/main/java/io/quarkus/runtime/ExecutorRecorder.java | 3 +++ .../io/quarkus/vertx/core/runtime/QuarkusExecutorFactory.java | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bom/application/pom.xml b/bom/application/pom.xml index 2c1f4e14984b7..55974d08bd8b9 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -113,7 +113,7 @@ 1.0.1.Final 2.6.0.Final 2.2.1.Final - 3.6.1.Final + 3.8.0.Final 4.5.10 4.5.14 4.4.16 diff --git a/core/builder/src/main/java/io/quarkus/builder/Execution.java b/core/builder/src/main/java/io/quarkus/builder/Execution.java index aaa7c96fadc03..5c7298c1cc610 100644 --- a/core/builder/src/main/java/io/quarkus/builder/Execution.java +++ b/core/builder/src/main/java/io/quarkus/builder/Execution.java @@ -56,6 +56,7 @@ final class Execution { this.finalIds = finalIds; final EnhancedQueueExecutor.Builder executorBuilder = new EnhancedQueueExecutor.Builder(); executorBuilder.setRegisterMBean(false); + executorBuilder.setQueueLimited(false); executorBuilder.setCorePoolSize(8).setMaximumPoolSize(1024); executorBuilder.setExceptionHandler(JBossExecutors.loggingExceptionHandler()); executorBuilder.setThreadFactory(new JBossThreadFactory(new ThreadGroup("build group"), Boolean.FALSE, null, "build-%t", diff --git a/core/runtime/src/main/java/io/quarkus/runtime/ExecutorRecorder.java b/core/runtime/src/main/java/io/quarkus/runtime/ExecutorRecorder.java index 47bc631081a2b..5c1fe2946c0a4 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/ExecutorRecorder.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/ExecutorRecorder.java @@ -170,9 +170,12 @@ private static EnhancedQueueExecutor createExecutor(ThreadPoolConfig threadPoolC if (threadPoolConfig.queueSize.isPresent()) { if (threadPoolConfig.queueSize.getAsInt() < 0) { builder.setMaximumQueueSize(Integer.MAX_VALUE); + builder.setQueueLimited(false); } else { builder.setMaximumQueueSize(threadPoolConfig.queueSize.getAsInt()); } + } else { + builder.setQueueLimited(false); } builder.setGrowthResistance(threadPoolConfig.growthResistance); builder.setKeepAliveTime(threadPoolConfig.keepAliveTime); diff --git a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/QuarkusExecutorFactory.java b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/QuarkusExecutorFactory.java index 82ef39b8f4b00..cd938faba2bc0 100644 --- a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/QuarkusExecutorFactory.java +++ b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/QuarkusExecutorFactory.java @@ -88,9 +88,12 @@ private ExecutorService internalCreateExecutor(ThreadFactory threadFactory, Inte if (conf.queueSize().isPresent()) { if (conf.queueSize().getAsInt() < 0) { builder.setMaximumQueueSize(Integer.MAX_VALUE); + builder.setQueueLimited(false); } else { builder.setMaximumQueueSize(conf.queueSize().getAsInt()); } + } else { + builder.setQueueLimited(false); } builder.setGrowthResistance(conf.growthResistance()); builder.setKeepAliveTime(conf.keepAliveTime()); From e12a3776707f1c33dbecfd262b26d6b0f411a9a8 Mon Sep 17 00:00:00 2001 From: "David M. Lloyd" Date: Sat, 5 Oct 2024 16:06:13 -0500 Subject: [PATCH 2/2] Do not load JBoss Logging from integration class loader --- .../src/main/java/io/quarkus/launcher/JBangIntegration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/launcher/src/main/java/io/quarkus/launcher/JBangIntegration.java b/core/launcher/src/main/java/io/quarkus/launcher/JBangIntegration.java index e0adc8e68e543..e70a771c4417d 100644 --- a/core/launcher/src/main/java/io/quarkus/launcher/JBangIntegration.java +++ b/core/launcher/src/main/java/io/quarkus/launcher/JBangIntegration.java @@ -83,7 +83,7 @@ public Class loadClass(String name) throws ClassNotFoundException { @Override protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { if (name.startsWith("org.") && !(name.startsWith("org.xml.") || name.startsWith("org.w3c.") - || name.startsWith("org.jboss."))) { + || (name.startsWith("org.jboss.") && !name.startsWith("org.jboss.logging.")))) { //jbang has some but not all the maven resolver classes we need on its //class path. These all start with org. so we filter them out to make sure //we get a complete class path