This is an automated email from the ASF dual-hosted git repository.

mpochatkin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new dafdda921cc IGNITE-22487 Remove compute.threadPoolStopTimeoutMillis 
config value (#5539)
dafdda921cc is described below

commit dafdda921ccf8d0d1d5712aebbad56fb952460f2
Author: Vadim Pakhnushev <[email protected]>
AuthorDate: Fri Apr 4 16:42:50 2025 +0300

    IGNITE-22487 Remove compute.threadPoolStopTimeoutMillis config value (#5539)
---
 docs/_docs/administrators-guide/config/node-config.adoc              | 4 +---
 .../internal/compute/configuration/ComputeConfigurationSchema.java   | 5 -----
 .../ignite/internal/compute/queue/ComputeThreadPoolExecutor.java     | 5 ++---
 .../apache/ignite/internal/compute/queue/PriorityQueueExecutor.java  | 5 +----
 .../org/apache/ignite/internal/compute/ComputeComponentImplTest.java | 2 +-
 5 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/docs/_docs/administrators-guide/config/node-config.adoc 
b/docs/_docs/administrators-guide/config/node-config.adoc
index 695fbac218f..eef738a5bd2 100644
--- a/docs/_docs/administrators-guide/config/node-config.adoc
+++ b/docs/_docs/administrators-guide/config/node-config.adoc
@@ -78,8 +78,7 @@ See the link:developers-guide/clients/overview[Clients] 
section for information
     "compute" : {
       "queueMaxSize" : 2147483647,
       "statesLifetimeMillis" : 60000,
-      "threadPoolSize" : 10,
-      "threadPoolStopTimeoutMillis" : 10000
+      "threadPoolSize" : 10
     }
   }
 }
@@ -91,7 +90,6 @@ See the link:developers-guide/clients/overview[Clients] 
section for information
 |queueMaxSize|2147483647|Maximum number of compute tasks in queue.| Yes | Yes 
| 1 - Integer.MAX_VALUE
 |statesLifetimeMillis|60000|The lifetime of job states after the job finishes, 
in milliseconds.| Yes | Yes | 0 - inf
 |threadPoolSize|10|The number of threads available to compute jobs.| Yes | Yes 
| 1 - Integer.MAX_VALUE
-|threadPoolStopTimeoutMillis|10000| Job thread pool stop timeout, in 
milliseconds.| Yes | Yes | 1 - inf 
 |======
 
 === Code Deployment Configuration
diff --git 
a/modules/compute/src/main/java/org/apache/ignite/internal/compute/configuration/ComputeConfigurationSchema.java
 
b/modules/compute/src/main/java/org/apache/ignite/internal/compute/configuration/ComputeConfigurationSchema.java
index 30ead2b9a1f..d2d944ee755 100644
--- 
a/modules/compute/src/main/java/org/apache/ignite/internal/compute/configuration/ComputeConfigurationSchema.java
+++ 
b/modules/compute/src/main/java/org/apache/ignite/internal/compute/configuration/ComputeConfigurationSchema.java
@@ -34,11 +34,6 @@ public class ComputeConfigurationSchema {
     @Value(hasDefault = true)
     public final int threadPoolSize = 
max(Runtime.getRuntime().availableProcessors(), 8);
 
-    /** Job thread pool stop timeout (milliseconds). */
-    @Range(min = 1)
-    @Value(hasDefault = true)
-    public final long threadPoolStopTimeoutMillis = 10_000;
-
     /**
      * Job queue max size.
      */
diff --git 
a/modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/ComputeThreadPoolExecutor.java
 
b/modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/ComputeThreadPoolExecutor.java
index f82307f1e03..a76c7f5e594 100644
--- 
a/modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/ComputeThreadPoolExecutor.java
+++ 
b/modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/ComputeThreadPoolExecutor.java
@@ -73,10 +73,9 @@ public class ComputeThreadPoolExecutor {
     /**
      * Shuts down the given executor service gradually, first disabling new 
submissions and later, if necessary, cancelling remaining
      * tasks.
-     *
      * {@link IgniteUtils#shutdownAndAwaitTermination}
      */
-    public void shutdown(long stopTimeout) {
-        IgniteUtils.shutdownAndAwaitTermination(executor, stopTimeout, 
TimeUnit.MILLISECONDS);
+    public void shutdown() {
+        IgniteUtils.shutdownAndAwaitTermination(executor, 10, 
TimeUnit.SECONDS);
     }
 }
diff --git 
a/modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/PriorityQueueExecutor.java
 
b/modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/PriorityQueueExecutor.java
index 3eb2fa65f95..aa1efe7128d 100644
--- 
a/modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/PriorityQueueExecutor.java
+++ 
b/modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/PriorityQueueExecutor.java
@@ -33,8 +33,6 @@ import 
org.apache.ignite.internal.compute.state.ComputeStateMachine;
 public class PriorityQueueExecutor {
     private static final long THREAD_KEEP_ALIVE_SECONDS = 60;
 
-    private final ComputeConfiguration configuration;
-
     private final ComputeThreadPoolExecutor executor;
 
     private final ComputeStateMachine stateMachine;
@@ -50,7 +48,6 @@ public class PriorityQueueExecutor {
             ThreadFactory threadFactory,
             ComputeStateMachine stateMachine
     ) {
-        this.configuration = configuration;
         this.stateMachine = stateMachine;
         BlockingQueue<Runnable> workQueue = new 
BoundedPriorityBlockingQueue<>(() -> configuration.queueMaxSize().value());
         executor = new ComputeThreadPoolExecutor(
@@ -97,6 +94,6 @@ public class PriorityQueueExecutor {
      * Shutdown executor. After shutdown executor is not usable anymore.
      */
     public void shutdown() {
-        executor.shutdown(configuration.threadPoolStopTimeoutMillis().value());
+        executor.shutdown();
     }
 }
diff --git 
a/modules/compute/src/test/java/org/apache/ignite/internal/compute/ComputeComponentImplTest.java
 
b/modules/compute/src/test/java/org/apache/ignite/internal/compute/ComputeComponentImplTest.java
index fe2a26d7bfb..d8a4b4b31dd 100644
--- 
a/modules/compute/src/test/java/org/apache/ignite/internal/compute/ComputeComponentImplTest.java
+++ 
b/modules/compute/src/test/java/org/apache/ignite/internal/compute/ComputeComponentImplTest.java
@@ -138,7 +138,7 @@ class ComputeComponentImplTest extends 
BaseIgniteAbstractTest {
     @Mock
     private LogicalTopologyService logicalTopologyService;
 
-    @InjectConfiguration("mock{threadPoolSize=1, 
threadPoolStopTimeoutMillis=100}")
+    @InjectConfiguration("mock{threadPoolSize=1}")
     private ComputeConfiguration computeConfiguration;
 
     @Mock

Reply via email to