eclipse / kapua

Eclipse Public License 2.0
227 stars 160 forks source link

♻️ [Database] Deprecate `db.pool.size.*` settings #4112

Closed Coduz closed 13 hours ago

Coduz commented 1 month ago

This PR deprecates commons.db.pool.size.min and commons.db.pool.size.max settings since they have changed their meaning/usage after #4067

We deprecated commons.db.pool.size.min and commons.db.pool.size.max settings, switching to a new commons.db.pool.size.fixed setting which will configure the database connection pool to a fixed size with a default value of 5.

Backward compatibility is granted by db.pool.size.strategy. Default value is fixed, but it can be changed to range to continue use of a variable database connection pool. Be aware that at some point range strategy will be removed and only fixed size will be available.

Related Issue This PR improves changes made in #4067

Description of the solution adopted Deprecated usage of:

Removed:

which were no longer used.

Introduced a new commons.db.pool.size.strategy and commons.db.pool.size.fixed settings to manage the pool sizing

Screenshots None

Any side note on the changes made Introduced UPGRADE_NOTES.md file to start maintaining a verbose upgrade notes log for notable changes in version

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 73.91304% with 12 lines in your changes missing coverage. Please review.

Project coverage is 16.79%. Comparing base (4116da6) to head (86528ae). Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
...java/org/eclipse/kapua/commons/jpa/DataSource.java 70.73% 9 Missing and 3 partials :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse/kapua/pull/4112/graphs/tree.svg?width=650&height=150&src=pr&token=1P4N4CApH8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)](https://app.codecov.io/gh/eclipse/kapua/pull/4112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) ```diff @@ Coverage Diff @@ ## develop #4112 +/- ## ============================================= + Coverage 16.75% 16.79% +0.03% Complexity 22 22 ============================================= Files 2037 2037 Lines 52796 52835 +39 Branches 4438 4441 +3 ============================================= + Hits 8847 8874 +27 - Misses 43551 43560 +9 - Partials 398 401 +3 ``` | [Files with missing lines](https://app.codecov.io/gh/eclipse/kapua/pull/4112?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | Coverage Δ | | |---|---|---| | [...kapua/commons/setting/system/SystemSettingKey.java](https://app.codecov.io/gh/eclipse/kapua/pull/4112?src=pr&el=tree&filepath=commons%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fcommons%2Fsetting%2Fsystem%2FSystemSettingKey.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-Y29tbW9ucy9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL2NvbW1vbnMvc2V0dGluZy9zeXN0ZW0vU3lzdGVtU2V0dGluZ0tleS5qYXZh) | `100.00% <100.00%> (ø)` | | | [...java/org/eclipse/kapua/commons/jpa/DataSource.java](https://app.codecov.io/gh/eclipse/kapua/pull/4112?src=pr&el=tree&filepath=commons%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fcommons%2Fjpa%2FDataSource.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-Y29tbW9ucy9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL2NvbW1vbnMvanBhL0RhdGFTb3VyY2UuamF2YQ==) | `75.92% <70.73%> (-18.20%)` | :arrow_down: |