quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.72k stars 2.67k forks source link

Rewrite Hibernate Reactive extension to decouple it from Hibernate ORM and use a common base instead #28629

Open yrodiere opened 2 years ago

yrodiere commented 2 years ago

Description

See https://github.com/quarkusio/quarkus/issues/21110#issuecomment-1120961408

But currently the Hibernate Reactive extension for Quarkus is in a problematic shape: it's highly coupled to the core of the Hibernate ORM blocking extension, and the presence of it actually taints the state of the blocking ORM instances. It needs to be rewritten with a more flexible design.

Essentially the Hibernate Reactive extension is relying on the Hibernate ORM extension, reusing parts of it but not others. It's imperfect, so sometimes it reuses things that make no sense for Hibernate Reactive (only for ORM), and sometimes it fails to reuse things that would make sense for both ORM and Hibernate Reactive (e.g. #28576).

Implementation ideas

We will probably want a common base for both Hibernate ORM and Reactive, and two separate extensions for Hibernate ORM and Reactive. We'll use SPIs to have each extension customize the base where necessary.

This will most likely be a large change, so it will have to wait until @Sanne is done with the Hibernate ORM 6 upgrade; else we'll have many conflicts.

quarkus-bot[bot] commented 2 years ago

/cc @DavideD, @Sanne, @gavinking

geoand commented 1 year ago

@Sanne is this being addressed by your changes?

Sanne commented 1 year ago

No

geoand commented 1 year ago

KK, thanks

dgusoft commented 1 week ago

Is there any plan to work on this? quarkus-hibernate-reactive-orm version 3.15.1 uses hibernate 6.6.0.Final, so the preconditions should be matched, aren't they?

yrodiere commented 1 week ago

Yes the upgrade to Jakarta EE and ORM 6+ was done. But in general, whether someone will work on it depends on other priorities: just because something is unstuck, doesn't mean it's the best use of our time.

In this specific case, I just had a discussion about it (before you commented) with a teammate, if all goes well he will start working on it soon.

For sure it won't be included in Quarkus 3.15 LTS, though: it's a major refactoring and it wouldn't be reasonable to backport it.

dgusoft commented 1 week ago

That sounds great. I think I can't help implementing that feature, because I have no experience with the quarkus framework code, but if you need a tester, let me know.