-
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
Hibernate Reactive Panache MySQL #35568
Comments
/cc @DavideD (hibernate-reactive), @FroMage (panache), @Sanne (hibernate-reactive), @gavinking (hibernate-reactive), @loicmathieu (panache) |
Hibernate Reactive doesn't support |
@DavideD Do you know another away to do that? I've tried something with count.flatMap(countResult -> content.map(contentResult -> new PageResult<>(page.index, page.size, countResult, contentResult))); |
Mmh... that seems the right approach. If you still have the timeout, the problem might be somewhere else. Could you provide a test project that we can run? |
@DavideD I create a small test project here (https://github.com/douglasss/panache-reactive-timeout) If you run the tests with |
Thanks @douglasss, that's great! |
I tried the project and adding @Get
@WithSession
public Uni<PageResult<Product>> getAll() {
return find();
} I was expecting some error when the annotation is missing though. |
|
TLDR> There is a bug in the implementation of The problem occurs if Panache entity methods are not "nested", for example like in the reproducer - The following code should work just fine: Uni<Long> count = Product
.count("from Product p join p.secondTable join p.thirdTable where p.id > 0");
return count
.flatMap(countResult -> Product
.<Product> find("from Product p join fetch p.secondTable join fetch p.thirdTable where p.id > 0",
Sort.ascending("p.id"))
.page(0, 10)
.list()
.map(contentResult -> new PageResult<>(countResult, contentResult))); Because when the If those calls are not nested then every operation (e.g. I'll try to send a PR with a fix shortly. |
- fixes quarkusio#35568 (cherry picked from commit 0d1ae5e)
- fixes quarkusio#35568 Backport conflict resolution: replaced quarkus-test-hibernate-reactive-panache with quarkus-test-vertx
Describe the bug
After Calling find() and count() on a table few times with ~10rows I am getting timeout:
I believe the connections are not being closed after the calls.
2023-08-25 11:28:34,464 ERROR [com.tha.ota.exc.ThrowableMapper] (vert.x-eventloop-thread-3) Timeout: io.vertx.core.impl.NoStackTraceThrowable: Timeout
Expected behavior
Not getting I timeout exception
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
OpenJDK Runtime Environment Corretto-17.0.7.7.1 (build 17.0.7+7-LTS)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.3.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.2
Additional information
No response
The text was updated successfully, but these errors were encountered: