Skip to content
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

[#3562] Migrate to Quarkus JDBC implementation #3563

Merged
merged 1 commit into from
Dec 12, 2023
Merged

[#3562] Migrate to Quarkus JDBC implementation #3563

merged 1 commit into from
Dec 12, 2023

Conversation

harism
Copy link
Contributor

@harism harism commented Oct 9, 2023

Implementation to solve #3555 (comment) and switch from Vert.x datasource use into ones provided by Quarkus. It is unclear yet does this fix issue [#3555] so I created new issue solely for this transformation.

This is very much a work in progress still and the JDBC unit tests do not all pass and Javadoc comments are made just to pass Stylecheck. But some JDBC unit tests pass too and use the Quarkus JDBC layer correctly.

Any comments are welcome, especially relating to that am I doing this correct way at all - while trying to isolate most of the related changes into base-jdbc module's new client package classes. And implement almost the same functionality in those that Vert.x has too to minimise code changes in other parts of the JDBC layer.

@harism harism requested a review from kaniyan as a code owner October 9, 2023 17:01
@harism
Copy link
Contributor Author

harism commented Oct 9, 2023

I managed to simplify and make the JDBC device registry unit tests work with somewhat small effort after all. This is just a guess but in the integration tests there might be Vert.x related exceptions due to Vert.x is possibly more concurrent environment than this implementation.

@sophokles73
Copy link
Contributor

@mattkaem would you mind taking a look?

@sophokles73 sophokles73 added the JDBC Device Registry The JDBC based Device Registry implementation label Oct 12, 2023
@mattkaem
Copy link
Contributor

@mattkaem would you mind taking a look?

I will try to take a look as soon as I have a bit of time

@harism harism requested a review from sophokles73 as a code owner October 14, 2023 14:22
@sophokles73 sophokles73 requested review from mattkaem and removed request for kaniyan October 15, 2023 06:19
@harism
Copy link
Contributor Author

harism commented Oct 15, 2023

I have been struggling with being Vert.x compliant by implementing own SQL client, connection and operations from there. But I just realized that Vert.x has Agroal support out-of-the-box too and it should be enough to take it into use. This PR simplifies alot.

@harism
Copy link
Contributor Author

harism commented Oct 15, 2023

There seems to be issue with both Vert.x AgroalCPDataSourceProvider implementations;

It seems best to provide Vert.x a custom intitialized AgroalDataSource instance to use.

@sophokles73
Copy link
Contributor

@harism Thanks for all the effort you have put into this :-) I am glad that you have managed to solve your issues with the integration tests and also have found a way to use existing functionality in vert.x 👍

I am currently attending EclipseCon but still hope to find some time to take a look. Again, big thanks for contributing ...

@harism
Copy link
Contributor Author

harism commented Oct 16, 2023

I am currently attending EclipseCon but still hope to find some time to take a look. Again, big thanks for contributing ...

No worries, and no rush, have a great time there at EclipseCon.

@mattkaem
Copy link
Contributor

mattkaem commented Nov 8, 2023

@harism Do you mind incorporating the changes that were made in this recently merged PR #3548 into this PR?

@harism
Copy link
Contributor Author

harism commented Nov 9, 2023

@harism Do you mind incorporating the changes that were made in this recently merged PR #3548 into this PR?

Done, I needed to adjust the minimum pool size and initial pool size to zero in the JDBC tests due to the tests execution leaks lots of Quarkus/Agroal DataSource pools and also individual connections. This should not happen during normal execution similarly.

@sophokles73
Copy link
Contributor

@mattkaem what is the status of this? Can this be merged?

@sophokles73
Copy link
Contributor

@mattkaem I would like to include this in 2.5.0 if possible. Any additional thoughts?

@mattkaem
Copy link
Contributor

@harism @sophokles73 sorry, I am back now from my vacation. I added an additional comment but I think this PR can be merged soon.

@sophokles73
Copy link
Contributor

@mattkaem what is the status of this PR?

@mattkaem
Copy link
Contributor

mattkaem commented Dec 6, 2023

@sophokles73 I will try to test the changes tomorrow.

Copy link
Contributor

@mattkaem mattkaem left a comment

Choose a reason for hiding this comment

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

Except the one outstanding comment, this looks very good to me now. @sophokles73 anything to add from your side? If not, I think once this last comment is resolved we can merge this.

@sophokles73 sophokles73 added this to the 2.5.0 milestone Dec 12, 2023
@sophokles73 sophokles73 merged commit 96bcb02 into eclipse-hono:master Dec 12, 2023
8 checks passed
@harism harism deleted the migrate_to_quarkus_jdbc branch December 18, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement JDBC Device Registry The JDBC based Device Registry implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants