dimas-b commented on code in PR #3523:
URL: https://github.com/apache/polaris/pull/3523#discussion_r2800517000


##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/MetaStoreManagerFactory.java:
##########
@@ -45,4 +45,18 @@ default Map<String, PrincipalSecretsResult> 
bootstrapRealms(BootstrapOptions boo
 
   /** Purge all metadata for the realms provided */
   Map<String, BaseResult> purgeRealms(Iterable<String> realms);
+
+  /**
+   * Checks if metrics persistence has been bootstrapped. This validation 
should be called at
+   * startup when metrics persistence is enabled.
+   *
+   * <p>The default implementation does nothing. Persistence backends that 
support metrics should
+   * override this to check if the required metrics tables exist.
+   *
+   * @throws IllegalStateException if metrics persistence is enabled but the 
required tables have
+   *     not been bootstrapped
+   */
+  default void checkMetricsPersistenceBootstrapped() {

Review Comment:
   I'm very hesitant to make this addition to the metastore factory when the 
general direction on this feature is to have an independent persistence for 
metrics 🤔 
   
   Please consider using a `ProductionReadinessCheck` instead. It should be 
possible to WARN or even fail on startup if feature flags are not aligned with 
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