Skip to content

Upgrade to Quarkus 3.32.2#10868

Open
tsegismont wants to merge 2 commits intoTechEmpower:masterfrom
tsegismont:quarkus-upgrade
Open

Upgrade to Quarkus 3.32.2#10868
tsegismont wants to merge 2 commits intoTechEmpower:masterfrom
tsegismont:quarkus-upgrade

Conversation

@tsegismont
Copy link
Contributor

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

@github-actions
Copy link
Contributor

The following frameworks were updated, pinging maintainers:
quarkus: @franz1981, @Sanne, @geoand

Copy link
Contributor

@joanhey joanhey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ?

PD: it's pure curiosity !!

@tsegismont tsegismont marked this pull request as ready for review March 11, 2026 21:37
@tsegismont
Copy link
Contributor Author

@Sanne @lucamolteni can you please take a look at the changes in WorldRepository? Hibernate Reactive no longer has the update method on a regular Session, so I changed to StatelessSession. It's similar to the implementation in the benchmark with Hibernate ORM

@Sanne
Copy link
Contributor

Sanne commented Mar 16, 2026

The reason I used "update" is to benefit from batching - not using a batch in a StatelessSession would be a disaster for efficiency.
@lucamolteni or @DavideD can you check how to do it correctly in the new API?

@DavideD
Copy link

DavideD commented Mar 16, 2026

I will have a look, but batching requires the use of the other update methods when using the stateless session:

	/**
		 * 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.
The reason is that batching doesn't allow the immediate execution of the queries and that's a prerogative of the stateless session

@DavideD
Copy link

DavideD commented Mar 16, 2026

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 StatelessSession.

@DavideD
Copy link

DavideD commented Mar 16, 2026

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.

@DavideD
Copy link

DavideD commented Mar 16, 2026

@tsegismont, I applied the changes I think are needed here: https://github.com/DavideD/FrameworkBenchmarks/commits/quarkus-upgrade/

  • 7bfb45e With the stateless session we should use .updateMultiple(...) for both Hibernate Reactive and ORM
  • ec368ac In the Hibernate Reactive benchmark, we shouldn't create data using Uni.combine().all(), even if it seems to work in this case

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.

@tsegismont
Copy link
Contributor Author

@DavideD can you please send a PR for the quarkus-upgrade branch in my fork?

@DavideD
Copy link

DavideD commented Mar 16, 2026

@DavideD can you please send a PR for the quarkus-upgrade branch in my fork?

Sure, I noticed that the change don't pass CI. I will try to fix it and send the PR

@DavideD
Copy link

DavideD commented Mar 16, 2026

@DavideD can you please send a PR for the quarkus-upgrade branch in my fork?

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
* 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
@tsegismont
Copy link
Contributor Author

Thank you @DavideD , the changes are in.

@Sanne can you please review again and add your 👍 so that the PR can me merged? Thanks

@Sanne
Copy link
Contributor

Sanne commented Mar 17, 2026

Thank you @DavideD , the changes are in.

@Sanne can you please review again and add your 👍 so that the PR can me merged? Thanks

Did someone verify that the performance doesn't change substantially when compared to the previous versions?
Sorry I won't be able to do that this week.

If metrics look fine then you can consider me happy! No need to look into the details of the code.

@franz1981
Copy link
Contributor

@Sanne at worse we are way distant from an offical round, so we can use the nightly on techempower itself to verify such

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants