dimas-b commented on code in PR #3960:
URL: https://github.com/apache/polaris/pull/3960#discussion_r2982252466
##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java:
##########
@@ -103,15 +107,22 @@ private void initializeForRealm(
// determine schemaVersion once per realm
final int schemaVersion =
JdbcBasePersistenceImpl.loadSchemaVersion(
- datasourceOperations,
+ metastoreOps,
realmConfig.getConfig(BehaviorChangeConfiguration.SCHEMA_VERSION_FALL_BACK_ON_DNE));
+ DatasourceOperations metricsOps =
+ getDatasourceOperations(realmContext,
DataSourceResolver.StoreType.METRICS);
Review Comment:
We obtain a dedicated `DataSource` for metrics, but the bootstrap method
(line 171 and below) runs the schema DLL always on the `METASTORE` `DataSource`.
This means that while the code makes the appearance that
`DataSourceResolver` may return a different data source for metrics, in
practice it will likely end up getting runtime errors due to missing tables.
WDYT?
##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/RelationalJdbcConfiguration.java:
##########
@@ -35,4 +35,7 @@ public interface RelationalJdbcConfiguration {
* the JDBC connection metadata. Supported values: "postgresql",
"cockroachdb", "h2"
*/
Optional<String> databaseType();
+
+ /** The type of the {@link DataSourceResolver} to use. */
+ String dataSourceResolverType();
Review Comment:
`JdbcCdiProducers` should be able to use a different config class (or simply
a local config parameter).
I believe this config method belongs to the CDI code, it is not be relevant
to JDBC Persistence implementations directly since they receive the
`DataSource` through injection and do not have to know how it was resolved.
--
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]