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

lhotari pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit b6ed5f134f236f6b84bfbb733fe34f2688d5d4b3
Author: Dream95 <[email protected]>
AuthorDate: Fri Jul 3 02:48:21 2026 +0800

    [fix][fn] Reorder Function Worker shutdown to stop scheduler before runtime 
manager (#26136)
    
    Signed-off-by: Dream95 <[email protected]>
    (cherry picked from commit 7a40adad02c11130a90e178e8b3aaed996fcacbb)
---
 .../pulsar/functions/worker/PulsarWorkerService.java     | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
index 233c4fdb695..0a098821af2 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
@@ -608,14 +608,6 @@ public class PulsarWorkerService implements WorkerService {
             }
         }
 
-        if (null != functionRuntimeManager) {
-            try {
-                functionRuntimeManager.close();
-            } catch (Exception e) {
-                log.warn("Failed to close function runtime manager", e);
-            }
-        }
-
         if (null != clusterServiceCoordinator) {
             clusterServiceCoordinator.close();
         }
@@ -628,6 +620,14 @@ public class PulsarWorkerService implements WorkerService {
             schedulerManager.close();
         }
 
+        if (null != functionRuntimeManager) {
+            try {
+                functionRuntimeManager.close();
+            } catch (Exception e) {
+                log.warn("Failed to close function runtime manager", e);
+            }
+        }
+
         if (null != leaderService) {
             try {
                 leaderService.close();

Reply via email to