Skip to content

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

@rakhiagr
Copy link
Contributor

rakhiagr commented Aug 6, 2025

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.

Do we need custom property anymore? IIUC, SERVICE_IDENTIFIER is only used for Flyway setup, since we have moved to Pretzel, maybe we can get rid of it.

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.

2 participants