adutra opened a new pull request, #4812:
URL: https://github.com/apache/polaris/pull/4812

   This change enables multiple datasources in Polaris, with possibility of 
**runtime** activation of the desired datasource.
   
   This is achieved by:
   
   1) Introducing a new enabler property: 
`polaris.persistence.relational.jdbc.datasource`, which points to a named 
datasource to activate.
   
   2) Declaring, **at build time**, one named datasource for each JDBC driver 
shipped with the application.
   
   3) Introducing a new `DataSourceActivator` config interceptor that will, at 
runtime, change the `active` setting of the target datasource to `true`, and 
all others to `false` (`active` is a runtime setting, contrary to `db-kind`).
   
   This change also makes the server ship with the H2 driver by default, since 
that's the pre-condition for an H2 datasource to be selected at runtime.
   
   This change will further enable **as future improvements**:
   
   - Using to JDBC + H2 by default for server images, while still allowing 
users to switch to PostgreSQL *without having to rebuild Polaris*.
   
   - Enabling the persistence to "plug" into not one, but many datasources, 
e.g. a specific datasource for main persistence, and a separate datasource for 
metrics. This was outlined in https://github.com/apache/polaris/pull/3960 – but 
the machinery to make that happen was missing.
   
   <!--
   📝 Describe what changes you're proposing, especially breaking or user-facing 
changes. 
   📖 See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
   -->
   
   ## Checklist
   - [ ] 🛡️ Don't disclose security issues! (contact [email protected])
   - [ ] 🔗 Clearly explained why the changes are needed, or linked related 
issues: Fixes #
   - [ ] 🧪 Added/updated tests with good coverage, or manually tested (and 
explained how)
   - [ ] 💡 Added comments for complex logic
   - [ ] 🧾 Updated `CHANGELOG.md` (if needed)
   - [ ] 📚 Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to