obelix74 commented on code in PR #3385:
URL: https://github.com/apache/polaris/pull/3385#discussion_r2776715379


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java:
##########
@@ -172,6 +172,13 @@ public synchronized Map<String, PrincipalSecretsResult> 
bootstrapRealms(
               datasourceOperations
                   .getDatabaseType()
                   .openInitScriptResource(effectiveSchemaVersion));
+
+          // Run the metrics schema script if requested
+          if (JdbcBootstrapUtils.shouldIncludeMetrics(bootstrapOptions)) {

Review Comment:
   Implemented in commit `c23b162e5`. Created a `MetricsSchemaBootstrap` SPI 
interface in `polaris-core` with `bootstrap(realmId)` and 
`isBootstrapped(realmId)` methods, plus a `NOOP` constant. The JDBC 
implementation (`JdbcMetricsSchemaBootstrap`) is idempotent and uses the 
`metrics_version` table to track bootstrap state.
   
   Also added a new `bootstrap-metrics` CLI command that allows operators to 
bootstrap the metrics schema independently:
   
   ```
   polaris-admin bootstrap-metrics -r my-realm
   ```
   This enables adding metrics persistence support to existing deployments 
without re-bootstrapping the entity schema.



-- 
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