-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fixes request context lost in Infinispan cache get/getasync #48200
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
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
...pan-cache/runtime/src/main/java/io/quarkus/cache/infinispan/runtime/InfinispanCacheImpl.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
...pan-cache/runtime/src/main/java/io/quarkus/cache/infinispan/runtime/InfinispanCacheImpl.java
Outdated
Show resolved
Hide resolved
...pan-cache/runtime/src/main/java/io/quarkus/cache/infinispan/runtime/InfinispanCacheImpl.java
Outdated
Show resolved
Hide resolved
...pan-cache/runtime/src/main/java/io/quarkus/cache/infinispan/runtime/InfinispanCacheImpl.java
Outdated
Show resolved
Hide resolved
...pan-cache/runtime/src/main/java/io/quarkus/cache/infinispan/runtime/InfinispanCacheImpl.java
Outdated
Show resolved
Hide resolved
My high level question is why are things being done with Context Propagation instead of the way that |
@geoand when I looked at the code of redis, I was under the impression that is because the client is the quarkus vert.x client, everything was working "automatically" comparing to the infinispan client. My personal issue is that I lack a bit of deep underlying knowledge at this point |
Okay, I was hoping that the Infinispan client had a Vert.x version... I know we can't do that now, but at some point we really should look into that. |
c6b51fb
to
65029b2
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@cescoffier does this seem good ? |
Should we use the duplicated context instead of context propagation? In this case, you would need to create an executor at the beginning of each method: var context = Vertx.currentContext();
var executor = r -> {
if (context == null) r.run();
else context.runOnContext(x -> r.run());
} (Avoid the lambdas in the real code) Then, before returning the Uni:
|
...pan-cache/runtime/src/main/java/io/quarkus/cache/infinispan/runtime/InfinispanCacheImpl.java
Outdated
Show resolved
Hide resolved
e887cb1
to
de25fa3
Compare
I tested and runned into the Suppressed: jakarta.enterprise.context.ContextNotActiveException: RequestScoped context was not active when trying to obtain a bean instance for a client proxy of CLASS bean [class=io.quarkus.it.cache.infinispan.ClientRequestService, id=VcMhAzqfwnRsjHRm80Y_wUxTmRc] |
Status for workflow
|
Uh oh!
There was an error while loading. Please reload this page.