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


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/RelationalJdbcProductionReadinessChecks.java:
##########
@@ -55,4 +56,50 @@ public ProductionReadinessCheck checkRelationalJdbc(
     }
     return ProductionReadinessCheck.OK;
   }
+
+  /**
+   * Checks if metrics persistence is properly configured. When metrics 
persistence is enabled, this
+   * check verifies that the metrics tables have been bootstrapped in the 
database.
+   *
+   * <p>This check only applies when using RelationalJdbc persistence and 
metrics persistence is
+   * enabled.
+   */
+  @Produces
+  public ProductionReadinessCheck checkMetricsPersistenceBootstrapped(
+      MetaStoreManagerFactory metaStoreManagerFactory,
+      Instance<DataSource> dataSource,
+      RelationalJdbcConfiguration relationalJdbcConfiguration,
+      @ConfigProperty(name = "polaris.persistence.metrics.enabled", 
defaultValue = "false")
+          boolean metricsPersistenceEnabled) {
+    // This check should only be applicable when persistence uses 
RelationalJdbc.
+    if (!(metaStoreManagerFactory instanceof JdbcMetaStoreManagerFactory)) {
+      return ProductionReadinessCheck.OK;

Review Comment:
   I had to rework this in this commit. 
https://github.com/apache/polaris/pull/3523/changes/dfaa124161a72119c8ad840acb3950fb24794bb8.
 



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