You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by GitBox <gi...@apache.org> on 2022/02/22 00:34:53 UTC

[GitHub] [tez] rbalamohan commented on a change in pull request #189: TEZ-4388: Asynchttpclient can cause stuck TezChild processes

rbalamohan commented on a change in pull request #189:
URL: https://github.com/apache/tez/pull/189#discussion_r811494055



##########
File path: tez-runtime-library/src/main/java/org/apache/tez/http/async/netty/AsyncHttpConnection.java
##########
@@ -102,6 +103,15 @@ private void initClient(HttpConnectionParams httpConnParams) throws IOException
               .build();
           DefaultAsyncHttpClientConfig config = builder.build();
           httpAsyncClient = new DefaultAsyncHttpClient(config);
+          TezRuntimeShutdownHandler.addShutdownTask(new Thread(() -> {
+            try {
+              if (httpAsyncClient != null) {
+                httpAsyncClient.close();

Review comment:
       Should httpAsyncClient be set to "null" explicitly as well? Without it, it may create issues during container reuse. i.e httpAsyncClient will not be null, but in closed state & system would try to use it leading to exceptions.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@tez.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org