-
Notifications
You must be signed in to change notification settings - Fork 93
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
StatelessSession insertAll in batch does not do batching #2108
Comments
How did you make this determination? Impossible to help you when you have not attached any sort of reproducer. |
I've created a quick test and it actually seems something is not right: DavideD@d6a35be |
But are you sure that the number of logged statements tells you anything about whether those statements are being batched or not? I don't recall how it worked in reactive, but that's certainly not how it works in ORM. |
The vert.x SQL client expects a query and a list of parameters, we log before calling the client, so checking the log should work for testing. The batch execution happens here: Line 258 in e1aff8f
I can also see that it works for the regular session, and that the batch options is skipped for some reason using the debugger. |
OK, fine. |
OK, @DavideD I believe I found the bug and have a fix. |
Or maybe not. Haha. |
:) It happens to me all the time |
…s not do batching
…s not do batching
…s not do batching
…s not do batching
I tried the method
insertAll(int batchSize, Object... entities)
but it does not do batching to insert the entities, they are all inserted using a separated query.I didn't find any documentation about insertAll.
Do I need to add some configuration to enable batching with StatelessSession ?
Do the dialect limit the use of the StatelessSession (mine is PostgreSQLDialect included in Hibernate core 6.6.6) ?
Thanks for your help :)
Quarkus: 3.18.2
Hibernate reactive: 2.4.4
The text was updated successfully, but these errors were encountered: