-
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 statement-batch-size is not used #16640
Comments
/cc @DavideD, @Sanne, @gavinking |
Created PR: Did I miss something or what do you think? |
It looks like that even more properties are not updated in hibernate-reactive to the same state as it exists in hibernate-orm. I am not really sure if I understand the configuration setup though. Are there some configuration which is shared? It is quite hard to understand which configuration should also work in hibernate-reactive. |
That is a very fair point. Yes the hibernate-reactive extension has been built as a POC extending the "traditional" Hibernate ORM extension, which implies it inherits all its configuration properties - and some other logic which it doesn't really need or use yet. We'll be separating it soon in fully independent extensions, that should help to clarify which properties are actually available for use. |
cc/ @gsmet : when separating the extensions, we should take such issues into account: they highlight that not all configuration properties for ORM "blocking" are suitable to be exposed on HR. |
I'm not sure if it's related, but note that there was a bug in HR that caused this property to be ignored. It should be fixed now. @Sanne |
Ok good to know. Still, it would be wise to keep the configuration properties separated. |
@Sanne @gavinking @holomekc this.jdbcBatchSize = ConfigurationHelper.getInt( STATEMENT_BATCH_SIZE, configurationSettings, 1 );
if ( !meta.supportsBatchUpdates() ) {
this.jdbcBatchSize = 0;
} In |
I think batch insert/update is still a very necessary requirement. |
Update my current progress. |
hi @cdmikechen - yes I agree fixing this would be important. Looking forward for any PRs you might have; feel free to ping me and/or @DavideD or @gavinking on PRs of either hibernate-reactive of hibernate-orm, we work on both projects and will try to prioritize these. |
Describe the bug
In hibernate-reactive the following property is ignored:
although it is described here. They also mention although it is a jdbc property it is used by hibernate reactive:
https://hibernate.org/reactive/documentation/1.0/reference/html_single/#_enabling_statement_batching
This is quite an important property to improve performance for example if you insert a lot of values.
Besides that I noticed that hibernate-reactive also uses the already deprecated value for batch-fetch-size and ignores the new property:
Expected behavior
statement-batch-size can be set and new property for fetch.batch-size can be set as well.
Actual behavior
See description of bug
To Reproduce
Enable logging and persist a collection or multiple entities of the same type and then check logs.
Configuration
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: