-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Execute gRPC request processing on duplicated contexts #23607
Execute gRPC request processing on duplicated contexts #23607
Conversation
extensions/grpc/deployment/src/test/java/io/quarkus/grpc/server/services/AssertHelper.java
Show resolved
Hide resolved
@@ -32,13 +36,15 @@ | |||
public Uni<EmptyProtos.Empty> emptyCallBlocking(EmptyProtos.Empty request) { | |||
assertThat(request).isNotNull(); | |||
assertRunOnWorker(); | |||
assertRunOnDuplicatedContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit surprised that not being on the event loop we still have a vertx context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know it's confusing. But inside an "executeBlocking" block, you still have access to the same context as outside (leading to fun concurrency issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it work for the root contexts too? Or only duplicated ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it also works from the root context too, but more like a side effect of the implementation of the executeBlocking.
This is actually why, inside an executeBlocking block, if you ask vert.x is the context is an event loop context, it will return true (while you are not running on the event loop).
...ntime/src/main/java/io/quarkus/grpc/runtime/supports/blocking/BlockingServerInterceptor.java
Outdated
Show resolved
Hide resolved
d773247
to
aeec9af
Compare
No description provided.