This is an automated email from the ASF dual-hosted git repository. mblow pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit aaa5ee78cd0eed738ae94dd234591cef95bc9173 Author: Michael Blow <[email protected]> AuthorDate: Wed Aug 21 08:22:42 2024 -0400 [NO ISSUE][HYR][HTTP] Use ForkJoinPool.commonPool() for cleanup on interrupt Ext-ref: MB-62923 Change-Id: I6315b7b42ffec2884aa2e8b2909f5512bd40dca5 Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18704 Integration-Tests: Jenkins <[email protected]> Reviewed-by: Michael Blow <[email protected]> Reviewed-by: Hussain Towaileb <[email protected]> Tested-by: Michael Blow <[email protected]> --- .../src/main/java/org/apache/hyracks/http/server/utils/HttpUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/utils/HttpUtil.java b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/utils/HttpUtil.java index 9f01123c0b..a84148406c 100644 --- a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/utils/HttpUtil.java +++ b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/utils/HttpUtil.java @@ -30,6 +30,7 @@ import java.util.Optional; import java.util.OptionalDouble; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; +import java.util.concurrent.ForkJoinPool; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; @@ -236,7 +237,8 @@ public class HttpUtil { try { return readFuture.get(); } catch (InterruptedException ex) { // NOSONAR -- interrupt or rethrow - executor.submit(() -> { + // we don't use the executor here, since it might be shutting down- this avoids ugly logging at shutdown + ForkJoinPool.commonPool().submit(() -> { try { response.close(); } catch (IOException e) {
