-
Notifications
You must be signed in to change notification settings - Fork 137
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
[#3562] Migrate to Quarkus JDBC implementation #3563
Conversation
...registry-jdbc/src/test/java/org/eclipse/hono/deviceregistry/jdbc/impl/TenantServiceTest.java
Outdated
Show resolved
Hide resolved
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. |
@mattkaem would you mind taking a look? |
I will try to take a look as soon as I have a bit of time |
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. |
services/base-jdbc/src/main/java/org/eclipse/hono/service/base/jdbc/config/JdbcProperties.java
Outdated
Show resolved
Hide resolved
services/base-jdbc/src/main/java/org/eclipse/hono/service/base/jdbc/config/JdbcProperties.java
Outdated
Show resolved
Hide resolved
There seems to be issue with both Vert.x
It seems best to provide Vert.x a custom intitialized AgroalDataSource instance to use. |
@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 ... |
No worries, and no rush, have a great time there at EclipseCon. |
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. |
services/base-jdbc/src/main/java/org/eclipse/hono/service/base/jdbc/config/JdbcProperties.java
Outdated
Show resolved
Hide resolved
services/base-jdbc/src/main/java/org/eclipse/hono/service/base/jdbc/config/JdbcProperties.java
Outdated
Show resolved
Hide resolved
@mattkaem what is the status of this? Can this be merged? |
@mattkaem I would like to include this in 2.5.0 if possible. Any additional thoughts? |
@harism @sophokles73 sorry, I am back now from my vacation. I added an additional comment but I think this PR can be merged soon. |
@mattkaem what is the status of this PR? |
@sophokles73 I will try to test the changes tomorrow. |
site/documentation/content/admin-guide/jdbc-device-registry-config.md
Outdated
Show resolved
Hide resolved
services/base-jdbc/src/main/java/org/eclipse/hono/service/base/jdbc/config/JdbcProperties.java
Show resolved
Hide resolved
There was a problem hiding this 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.
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 newclient
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.