-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Quarkus cache does not work with kotlin suspend functions #23746
Comments
/cc @evanchooly, @gwenneg |
A possible workaround for this issue is to wrap the cached method and to use the kotlin-mutiny lib:
|
I'm not familiar enough with all this to create a reproducer on my own. Can you put one together and I'll dig in to it? Thanks. |
Sure 👍 : https://github.com/u6f6o/quarkus-suspend-cache-issue If you run the test, it should fail with someting like:
|
So I've poked at this a bit and i think the changes (more specifically where) that are likely needed needs someone a bit more familiar with the caching code. Perhaps @mkouba would know or know who to ping? |
I can help with that @evanchooly. |
Is someone working on this? If not, I can pick it up |
Sorry, I'm swamped with other subjects, I couldn't find the time to look at this one so far. Feel free to pick it up @geoand. |
@evanchooly have you started looking into this? |
This issue and #21592 could be related. |
I didn't get far. I'm out this week at a conference so please take it. |
I doubt I'll have time this week, but if I do, I'll let you know |
Any updates on this issue? |
Nope, things have pilled up so this has moved to the back of my list |
@geoand Any updates? Maybe for 2.13 😄 ? |
Not a chance :) |
Other things keep getting higher priority, so I really don't know when I'll get around to this |
@geoand Is there any MR that I could use as a reference point? I was thinking about having a look and deciding whether I feel capable to create a MR on my own. |
#24741 is probably somewhat similar |
Any progress on this? |
Not yet |
Any progress perhaps?:) |
@Ladicek made recently great progress to simplify the support of kotlin coroutines support in Quarkus itself (#26728 (comment); #40815). Maybe this info helps in implementing this feature. |
Any update? |
Describe the bug
Quarkus-cache does not work correctly with kotlin suspend functions. The following code snippet
results in
We can workaround this behaviour by returning a CompletionStage from the rest client and work with unis instead.
Expected behavior
Quarkus-cache should work with suspend functions as well.
Actual behavior
How to Reproduce?
No response
Output of
uname -a
orver
Darwin MB-07-P15.fritz.box 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "11.0.13" 2021-10-19 OpenJDK Runtime Environment GraalVM CE 20.3.4 (build 11.0.13+7-jvmci-20.3-b24) OpenJDK 64-Bit Server VM GraalVM CE 20.3.4 (build 11.0.13+7-jvmci-20.3-b24, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 7.3.3
Additional information
No response
The text was updated successfully, but these errors were encountered: