Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

Spring Boot 2 Upgrade: Part 2 - Consolidate DB Config#1367

Closed
randomnicode wants to merge 12 commits into
airsonic:masterfrom
randomnicode:migratedb
Closed

Spring Boot 2 Upgrade: Part 2 - Consolidate DB Config#1367
randomnicode wants to merge 12 commits into
airsonic:masterfrom
randomnicode:migratedb

Conversation

@randomnicode

@randomnicode randomnicode commented Oct 23, 2019

Copy link
Copy Markdown
Contributor

This builds on #1364 and further consolidates DB config.

No major changes, except componentizing most configurations.

One minor change:

Previously:

  • legacy: all parameters (url, user/pass, driver, connection pool) hardcoded. connection pool is absent
  • embed: all parameters (except connection pool) taken from external config. connection pool is present

Now:

  • legacy and embed: for all parameters (except connection pool), check external config and if absent take default. connection pool is absent and present, respectively

Summarily, distinction between legacy and embed profiles now is the presence of a connection pool. Both will look at external config and if absent, they'll use defaults.

This should incorporate existing behavior, and so is a non-breaking change. All existing legacy clients don't have any config, and so will fall back to defaults. All existing embed have configs, so will continue using them.

This behavior is cleaner and

  • allows switching/specifying alternate legacy db locations (for instance two legacy airsonic dbs)
  • allows use or exclusion of connection pools

At some point we should rename these profiles, and rename the environment variables accordingly (likely a breaking change). Embed db profiles for external DBs seems misleading.

This is Step 2 of a series of PRs each of which will build on each other

Next up: Remove DBCP2's Connection Pooling and switch to default Tomcat/Hikari

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

type: dependency-upgrade A dependency upgrade.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants