Conversation
|
The following frameworks were updated, pinging maintainers: |
|
@Sanne @lucamolteni can you please take a look at the changes in |
|
The reason I used "update" is to benefit from batching - not using a batch in a |
|
I will have a look, but batching requires the use of the other /**
* Update multiple rows, using the number of the
* given entities as the batch size.
*
* @param entities detached entity instances
*
* @see org.hibernate.StatelessSession#update(Object)
*/
Uni<Void> updateAll(Object... entities);
/**
* Update multiple rows.
*
* @param batchSize the batch size
* @param entities detached entity instances
*
* @see org.hibernate.StatelessSession#update(Object)
*/
Uni<Void> updateAll(int batchSize, Object... entities);
/**
* Update multiple rows, using the size of the
* given list as the batch size.
*
* @param entities detached entity instances
*
* @see org.hibernate.StatelessSession#update(Object)
*/
Uni<Void> updateMultiple(List<?> entities);I think it's the same for ORM. |
|
I'm not sure if saving each entity separately is a requirement of the benchmark, but, if you want to have batching and call update on each entity, you cannot use a |
|
I noticed that in the test we are already passing a list of entities to update, so it should be ok to change it. I will create a PR. |
|
@tsegismont, I applied the changes I think are needed here: https://github.com/DavideD/FrameworkBenchmarks/commits/quarkus-upgrade/
I'm trying to figure out how to test it, though. But let me know if you want me to send a new PR or you are ok with cherry picking that changes you need. |
|
@DavideD can you please send a PR for the |
Sure, I noticed that the change don't pass CI. I will try to fix it and send the PR |
See tsegismont#4 |
It was required to add the os-maven-plugin.
Otherwise, the container image build fails with:
Could not find artifact io.netty:netty-transport-native-unix-common:jar:${os.detected.name}-${os.detected.arch}:4.1.130.Final in central
Also, Hibernate no longer has the update method on the regular session.
And, for convenience, added quarkus.hibernate-orm.log.sql in application.properties
b97783c to
5189165
Compare
* Stateless session should use batching In Hibernate ORM and Reactive, the stateless session ignore the batch size property. The reason is that the stateless session execute queries immediately and does not store the entities to execute a batch update later. To enable batching, we need to use the `updateMultiple` method instead. It will use the size of the list as batch value. * Use loop for creating data with Hibernate Reactive Currently, is not safe to use the Hibernate Reactive session with `Uni.combine().all()`. Even if it still work for a simple scenario like the one in the benchmark. This commit change it to for loop so that the uni are executed sequentially. Using `.usingConcurrencyOf(1)` would have also worked. * Small clean up * Remove unused findManaged
Did someone verify that the performance doesn't change substantially when compared to the previous versions? If metrics look fine then you can consider me happy! No need to look into the details of the code. |
|
@Sanne at worse we are way distant from an offical round, so we can use the nightly on techempower itself to verify such |
It was required to add the
os-maven-plugin. Otherwise, the container image build fails with:Also, Hibernate no longer has the update method on the regular session.
And, for convenience, added
quarkus.hibernate-orm.log.sqlin application.properties