This is an automated email from the ASF dual-hosted git repository.
lhotari 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 5fd7518bd55 [improve][fn] Avoid gRPC timeout when getting status of a
dead process runtime (#25819)
5fd7518bd55 is described below
commit 5fd7518bd5522a0084d876c745a0ec870f1f2316
Author: Dream95 <[email protected]>
AuthorDate: Tue May 19 19:43:54 2026 +0800
[improve][fn] Avoid gRPC timeout when getting status of a dead process
runtime (#25819)
Signed-off-by: Dream95 <[email protected]>
---
.../apache/pulsar/functions/runtime/process/ProcessRuntime.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/process/ProcessRuntime.java
b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/process/ProcessRuntime.java
index 9a0f920b8cb..9bda931ba5c 100644
---
a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/process/ProcessRuntime.java
+++
b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/process/ProcessRuntime.java
@@ -241,6 +241,15 @@ class ProcessRuntime implements Runtime {
retval.completeExceptionally(new RuntimeException("Not alive"));
return retval;
}
+ if (!isAlive()){
+ FunctionStatus status = new FunctionStatus();
+ status.setRunning(false);
+ if (deathException != null && deathException.getMessage() != null)
{
+ status.setFailureException(deathException.getMessage());
+ }
+ retval.complete(status);
+ return retval;
+ }
stub.withDeadlineAfter(GRPC_TIMEOUT_SECS, TimeUnit.SECONDS)
.getFunctionStatus(new Empty(), new StreamObserver<>() {
@Override