-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onCancel is not invoked up on server-side deadline expiration #11872
Comments
Our issue is that the resource cleanup logic residing in the As a workaround, I am considering moving the cleanup logic from the |
Does setting |
A quick update: I started getting mixed results as I investigated further. Now I can see that in some scenarios
My current hypothesis is that because If the above is true, is the Edit:
My current understanding is that |
Whether callExecutor or cancelExecutor gets used is dependent on the status passed here. For the screenshot you have shown since it shows DEADLINE_EXCEEDED and a reset frame sent from the server, in this case it should be on the cancel executor. For status code Ok which would be the case when the server normally completes a RPC, it will run on the callExecutor. |
What version of gRPC-Java are you using?
1.67.1
What is your environment?
OS:
MacOS 15.2
JDK:
openjdk version "17.0.12" 2024-07-16 LTS
What did you expect to see?
When a request times out on the server, the server invokes the
ServerCall.Listener::onCancel
callback.What did you see instead?
The
ServerCall.Listener::onCancel
callback is not invoked.Steps to reproduce the bug
Thread.sleep(10_000)
);curl
to ensure the client does not send a cancellation signal after the client-side deadline expires.onCancel
callback is not invoked despite the request'scontext
being cancelled correctly with aTimeoutException
after 500ms.The text was updated successfully, but these errors were encountered: