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

feat: enable HikariCP for server config #444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ybz1013
Copy link
Contributor

@ybz1013 ybz1013 commented Oct 7, 2024

Summary

There was a mysql connection issue in TMS and AIM-service-gms, and the current ebean connection pool makes it impossible to investigate. The mysql team suggested we migrate to HikariCP for better support from them.

Migration guide: https://shiny-chainsaw-yr6m6q9.pages.github.io/pages/migrating/JMP7.html
TLDR; the ServerConfig was originally setting DataSourceConfig (Ebean), and after migration to HikariCP, we should put the config in a HikariDataSource and use setDataSource instead of setDataSourceConfig.

Detail

To keep supporting Ebean pool, we will add a dual mode, so GMS that doesn't want to switch to Hikari can still make datahub-gma version upgrade. The only usage of the ServerConfig is changed to check if the config is a Hikari config first.

Note that Hikari config can't have a custom property like the old DataSourceConfig, so for GMS that needs to set values in custom property, e.g. SERVICE_IDENTIFIER, they have to stay with DataSourceConfig.

Testing Done

./gradlew build

Checklist

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.

1 participant