Skip to content

Commit

Permalink
OAP-219 oap-application: detecting timeouts when a service stops
Browse files Browse the repository at this point in the history
  • Loading branch information
galaxina committed Oct 25, 2024
1 parent 7967cba commit 4f52504
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/
package oap.application.supervision;

import io.micrometer.core.instrument.util.NamedThreadFactory;
import lombok.extern.slf4j.Slf4j;
import oap.application.KernelHelper;
import oap.concurrent.Executors;
import oap.concurrent.ThreadPoolExecutor;
import oap.util.BiStream;
import oap.util.Dates;
import oap.util.Throwables;
Expand All @@ -38,6 +36,7 @@
import java.util.List;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
Expand Down Expand Up @@ -288,7 +287,7 @@ public static class ShutdownConfiguration implements Closeable {
private static final Set<String> on = Set.of( "on", "1", "true", "ON", "TRUE", "yes", "YES" );
public final long timeoutMs;
public final boolean forceAsyncAfterTimeout;
public final ThreadPoolExecutor threadPoolExecutor = Executors.newFixedBlockingThreadPool( 1, new NamedThreadFactory( "stop" ) );
public final ExecutorService threadPoolExecutor = Executors.newCachedThreadPool();

public ShutdownConfiguration() {
String timeoutMsStr = System.getenv( "APPLICATION_STOP_DETECT_TIMEOUT" );
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</distributionManagement>

<properties>
<oap.project.version>22.5.3</oap.project.version>
<oap.project.version>22.5.4</oap.project.version>

<oap.deps.config.version>21.0.0</oap.deps.config.version>
<oap.deps.oap-teamcity.version>21.0.1</oap.deps.oap-teamcity.version>
Expand Down

0 comments on commit 4f52504

Please sign in to comment.