Skip to content

fix: propagate suspend result in Redis request invoker#52

Open
Keviro wants to merge 1 commit intomasterfrom
codex/fix-suspension-issue-in-request-handlers
Open

fix: propagate suspend result in Redis request invoker#52
Keviro wants to merge 1 commit intomasterfrom
codex/fix-suspension-issue-in-request-handlers

Conversation

@Keviro
Copy link
Copy Markdown

@Keviro Keviro commented May 4, 2026

Motivation

  • Ensure coroutine suspension is correctly propagated when invoking suspend request handlers so COROUTINE_SUSPENDED is not dropped and in-flight continuations/responses are not lost.

Description

  • Return the result of HANDLE.invoke(context, $completion) in the IS_SUSPEND branch of RedisRequestHandlerInvokerTemplate.invoke(...) so the suspend call's result (e.g., COROUTINE_SUSPENDED) is propagated, while leaving the non-suspend branch unchanged.

Testing

  • Attempted to run ./gradlew :surf-redis-core:test, but the build could not run in this environment because the configured Gradle plugin requires Java 25 while the runner JVM is Java 21, so no automated test results were produced.

Codex Task

Copilot AI review requested due to automatic review settings May 4, 2026 22:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes coroutine suspension propagation for Redis request handler invocation by returning the result of the underlying MethodHandle call in the suspend-path of the hidden-class invoker template, ensuring COROUTINE_SUSPENDED is not dropped during handler dispatch.

Changes:

  • Propagate the return value of HANDLE.invoke(context, $completion) for suspend request handlers so coroutine suspension/resumption works correctly.
  • Leave non-suspend handler invocation behavior unchanged.

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