Skip to content

Convert ReactiveConnection#close to a reactive method #725

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

Merged
merged 4 commits into from
Apr 29, 2021

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented Apr 26, 2021

Fixes #716

This should fix the issue about the close method not being reactive, I had to adapt our tests as well so there are a lot of changes to the test suite.

I'm not sure about the impact on Quarkus, considering that they are close to a release, it would be safer to merge this after their next release.

@DavideD DavideD added design A design or implementation issue waiting We are waiting for another PR or issue to be solved before merging this one labels Apr 26, 2021
@DavideD DavideD requested a review from gavinking April 26, 2021 14:23
@gavinking
Copy link
Member

@DavideD why's this still a draft?

@DavideD
Copy link
Member Author

DavideD commented Apr 29, 2021

No reason, I just need to update the tests we merged yesterday and then I can switch it a regular PR

@DavideD
Copy link
Member Author

DavideD commented Apr 29, 2021

@Sanne What do you think? In relation to Quarkus, is it safer to wait and merge it after the next release or we can merge it now?

@Sanne
Copy link
Member

Sanne commented Apr 29, 2021

I think we need to sort these aspects quickly, so I'm inclined to suggest mering it now - but I wonder if t hat implies that we won't be able to upgrade Hibernate Reactive in Quarkus for a while as I understand it will require some changes there too?

Did you have a look at how significant the changes would need to be on that side?

As you know there's an upgrade of ORM which needs to get in Quarkus soon, which will break Hibernate Reactive so we'll need to be able to relase an HR build which keeps the Quarkus build afloat while this other work is settled.

@gavinking
Copy link
Member

I think it's very important that we get breaking API changes released as soon as possible, to avoid creating more problems for users. If that includes fixes to the Quarkus extension and to Panache Reactive, then they also need to be prioritized.

@Sanne
Copy link
Member

Sanne commented Apr 29, 2021

agreed @gavinking , but when we have both ORM core and HR bringing breaking changes to the table, we might need to address one at a time - which in this case would imply having an HR release which adapts to the changes in ORM but doesn't break other things.

The alternative is to send both upgrades combined to Quarkus, which is entirely an option but I'm just warning that for it to be feasible we need to have an idea of the complexity: I can't delay the ORM upgrade in Quarkus further as there's many other works depending on it.

@gavinking
Copy link
Member

Right, but I mean: it's pretty bad that we're not releasing connections!

@Sanne
Copy link
Member

Sanne commented Apr 29, 2021

ah yes it's very bad. Don't get me wrong, I want both breaking changes integrated ASAP - just figuring out what's the fastest way to have it all at least resistance.

DavideD added 4 commits April 29, 2021 13:10
* Replace deprecated method calls
* Remove some Idea warnings
* Replace with method reference
* Change to static class a test entity
They made it reactive with the upgrade to
Vert.x SQL client 4.

We also have to update the tests becaus now
they have to wait for the session to be close before
moving to the next chained operation.
Now that the close method is reactive, we cannot make
the session Autoclosable anymore.
@Sanne
Copy link
Member

Sanne commented Apr 29, 2021

Interestingly we can merge this as it doesn't need any changes to compile in Quarkus.

Obviously we'll need to make changes to actually close the resources, but we don't need to wait with merging this particular patch.

@DavideD DavideD marked this pull request as ready for review April 29, 2021 13:49
@DavideD DavideD merged commit d635cfc into hibernate:main Apr 29, 2021
@DavideD
Copy link
Member Author

DavideD commented Apr 29, 2021

Merged!

@DavideD DavideD linked an issue Apr 29, 2021 that may be closed by this pull request
@DavideD
Copy link
Member Author

DavideD commented Apr 29, 2021

Damn! Wrong issue number in the commit messages. It's actually #716

@DavideD DavideD deleted the 712-fix-close branch June 2, 2021 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design A design or implementation issue waiting We are waiting for another PR or issue to be solved before merging this one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReactiveConnection#close should return a CompletionStage
3 participants