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

jerrypeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new be93e14  [pulsar-function] Stop calling the deprated method 
Thread.stop when stopping the function thread in ThreadRuntime. (#11401)
be93e14 is described below

commit be93e1483b62b4f7c8e6199cee190652b751181b
Author: Gimi Liang <[email protected]>
AuthorDate: Mon Jul 26 13:00:53 2021 -0700

    [pulsar-function] Stop calling the deprated method Thread.stop when 
stopping the function thread in ThreadRuntime. (#11401)
    
    * Stop calling the deprated method Thread.stop when stopping the function 
thread in ThreadRuntime.
    
    * Updated warning message per review comment.
---
 .../java/org/apache/pulsar/functions/runtime/thread/ThreadRuntime.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/thread/ThreadRuntime.java
 
b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/thread/ThreadRuntime.java
index 474410c..e26887b 100644
--- 
a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/thread/ThreadRuntime.java
+++ 
b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/thread/ThreadRuntime.java
@@ -206,7 +206,7 @@ public class ThreadRuntime implements Runtime {
                 // kill the thread
                 fnThread.join(THREAD_SHUTDOWN_TIMEOUT_MILLIS, 0);
                 if (fnThread.isAlive()) {
-                    fnThread.stop();
+                    log.warn("The function instance thread is still alive 
after {} milliseconds. Giving up waiting and moving forward to close 
function.", THREAD_SHUTDOWN_TIMEOUT_MILLIS);
                 }
             } catch (InterruptedException e) {
                 // ignore this

Reply via email to