Skip to content
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

Value of hibernate.jdbc.batch_size is ignored #877

Closed
DavideD opened this issue Jun 29, 2021 · 7 comments · Fixed by #904 or #925
Closed

Value of hibernate.jdbc.batch_size is ignored #877

DavideD opened this issue Jun 29, 2021 · 7 comments · Fixed by #904 or #925
Assignees
Labels
bug Something isn't working
Milestone

Comments

@DavideD
Copy link
Member

DavideD commented Jun 29, 2021

It doesn't matter what we set it to, it's always 0.

The reason is that in SessionFactoryOptionsBuilder, there's a check to see if the database supports batching and it always return false. It happens because we don't extract the info from the database

@gavinking
Copy link
Member

What I don't understand about this is that I thought we had tests that test statement batching.

@DavideD
Copy link
Member Author

DavideD commented Jul 8, 2021

Well... those tests check that if you set the property everything works fine, they don't really test that it is actually using batching (as far as I remember).

@gavinking
Copy link
Member

Well, you're right, BatchingConnection is never instantiated. So whatever tests we have (ReactiveSessionTest, FTR) certainly don't test that batching actually happens. (Which is not actually surprising, since it's not observable via the API.)

But what is weird is that I certainly did test that BatchingConnection works when I first wrote it.

@gavinking
Copy link
Member

Well... those tests check that if you set the property everything works fine, they don't really test that it is actually using batching (as far as I remember).

Yes, right, that's what I just realized.

@DavideD
Copy link
Member Author

DavideD commented Jul 8, 2021

Will this be solved by this other issue?

@gavinking
Copy link
Member

gavinking commented Jul 8, 2021

Rrrrm, not automatically, but in principle perhaps that's one option for where we could hook in. I'm not sure.

@DavideD DavideD modified the milestones: 1.0.0.CR8, 1.0.0.CR9 Jul 13, 2021
@gavinking
Copy link
Member

@DavideD isn't there a simpler temporary solution we could use?

Like, do it in ReactiveSessionFactoryBuilderService.createSessionFactoryBuilder() and ReactiveEntityManagerFactoryBuilder.build(), for example?

@gavinking gavinking self-assigned this Jul 26, 2021
gavinking added a commit that referenced this issue Jul 26, 2021
DavideD pushed a commit that referenced this issue Jul 26, 2021
blafond pushed a commit to blafond/hibernate-reactive that referenced this issue Aug 3, 2021
@DavideD DavideD linked a pull request Aug 3, 2021 that will close this issue
blafond pushed a commit to blafond/hibernate-reactive that referenced this issue Aug 3, 2021
blafond pushed a commit to blafond/hibernate-reactive that referenced this issue Aug 3, 2021
blafond added a commit that referenced this issue Aug 3, 2021
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Aug 3, 2021
We shouldn't ignore the return value of closeSession
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants