XN137 commented on code in PR #2217:
URL: https://github.com/apache/polaris/pull/2217#discussion_r2244754351


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java:
##########
@@ -96,14 +96,17 @@ private void initializeForRealm(
     // Materialize realmId so that background tasks that don't have an active
     // RealmContext (request-scoped bean) can still create a 
JdbcBasePersistenceImpl
     String realmId = realmContext.getRealmIdentifier();
+    // determine schemaVersion once per realm
+    final int schemaVersion = 
JdbcBasePersistenceImpl.loadSchemaVersion(datasourceOperations);

Review Comment:
   it seems possible yeah but we also run the init script once per realm it 
seems?
   
   
https://github.com/apache/polaris/blob/2117dbd08e8352b32a2c948ed6c166d7c77da50a/persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java#L148-L158
   
   and since `DatasourceOperations` is the input parameter i thought its better 
to do it per realm as well.
   as suggested it should still massively reduce the number of fetch schema 
version queries.



-- 
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: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to