Skip to content

[improve][fn] Avoid gRPC timeout when getting status of a dead process runtime#25819

Merged
lhotari merged 1 commit into
apache:masterfrom
Dream95:improve_proccess_fn
May 19, 2026
Merged

[improve][fn] Avoid gRPC timeout when getting status of a dead process runtime#25819
lhotari merged 1 commit into
apache:masterfrom
Dream95:improve_proccess_fn

Conversation

@Dream95
Copy link
Copy Markdown
Contributor

@Dream95 Dream95 commented May 19, 2026

Motivation

In process runtime mode, When the child process had exited, the stub could still be non-null, so the call continued through gRPC getFunctionStatus and could block until the 5-second deadline expired.

Aligned ProcessRuntime.getFunctionStatus() with ThreadRuntime.getFunctionStatus() by checking !isAlive() before invoking gRPC.

Modifications

  • In ProcessRuntime.getFunctionStatus(), if !isAlive(), complete immediately with running=false and populate failureException from the stored deathException when available, without invoking gRPC.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

…s runtime

Signed-off-by: Dream95 <zhou_8621@163.com>
Copy link
Copy Markdown
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lhotari lhotari added this to the 5.0.0-M1 milestone May 19, 2026
@lhotari lhotari merged commit 5fd7518 into apache:master May 19, 2026
44 checks passed
lhotari pushed a commit that referenced this pull request May 22, 2026
…s runtime (#25819)

Signed-off-by: Dream95 <zhou_8621@163.com>
(cherry picked from commit 5fd7518)
lhotari pushed a commit that referenced this pull request May 22, 2026
…s runtime (#25819)

Signed-off-by: Dream95 <zhou_8621@163.com>
(cherry picked from commit 5fd7518)
@Dream95 Dream95 deleted the improve_proccess_fn branch May 25, 2026 03:38
nodece pushed a commit to ascentstream/pulsar that referenced this pull request May 27, 2026
…s runtime (apache#25819)

Signed-off-by: Dream95 <zhou_8621@163.com>
(cherry picked from commit 5fd7518)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants