Skip to content

gRPC server does not get notified about cancellation on client side during non-streaming requests #5562

Open
@alerosmile

Description

@alerosmile

Version

4.5.14

Context

I'm using Quarkus and Mutiny to implement gRPC services and clients. I noticed that a Uni or Multi subscription cancellation does not get forwarded to the server. To solve this, I created a PR on Quarkus. My tests fail if Vert.x gRPC server support is enabled on Quarkus (quarkus.grpc.server.use-separate-server=false) when the request is a Uni. I found that the Http2ServerRequest.handleReset() method is responsible for this because the reset exception is not forwarded to the event handler since the request has already ended.

Shouldn't this event still be forwarded? Otherwise, the server has no way to get notified about cancellation events from the client. In reactive programming, it is crucial for the server to be aware of cancellation events to manage resources effectively and maintain proper communication flow.

Do you have a reproducer?

See the integration tests on my PR on Quarkus. The O2NCancellationTest and VertxCancellationTest need to be enabled, as they currently fail due to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions