obelix74 commented on PR #3385:
URL: https://github.com/apache/polaris/pull/3385#issuecomment-3954219424
> Sync with @obelix74 offline, we should be good to go once these two things
are fixed
>
> 1. The same schema version for metrics table and other tables. We spent a
lot of time to make sure schema evolution work. Keeping the same schema version
will ensure this continue to work without extra wiring in code and mental
burden for the system admin. A system admin wont' be confused by which two
versions should work together.
> 2. Named data source, as this following sample code shows, we could
introduce a new data source like `metricsDatasourceOperations`, so that all
MetricsPersistence related method can use the separate data source. In that
case, no extra pluming is needed. Classes like `JdbcMetricsPersistenceProducer`
are not needed. The bootstrap behavior should also be part of
`JdbcMetaStoreManagerFactory`, we could still route metrics related bootstrap
logic from the method `bootstrapRealms`.
>
> ```
> public class JdbcBasePersistenceImpl implements BasePersistence,
IntegrationPersistence, MetricsPersistence {
>
> private static final Logger LOGGER =
LoggerFactory.getLogger(JdbcBasePersistenceImpl.class);
>
> private final PolarisDiagnostics diagnostics;
> private final DatasourceOperations datasourceOperations;
> private final DatasourceOperations metricsDatasourceOperations;
> ```
Pushed commit 9e3d4d0f409720ab4005db176190ebde29a9d2b6, with the following
changes.
1. Consolidated metrics to base schema.
2. Removed separate metrics bootstrapping.
3. Introduced named datasource for metrics.
4. Removed separate metrics schema versioning.
5. Updated QueryGenerator as per @singhpk234 's comment.
--
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]