eric-maynard commented on code in PR #2762:
URL: https://github.com/apache/polaris/pull/2762#discussion_r2408974203
##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java:
##########
@@ -154,6 +159,19 @@ public synchronized Map<String, PrincipalSecretsResult>
bootstrapRealms(
RealmContext realmContext = () -> realm;
if (!metaStoreManagerMap.containsKey(realm)) {
DatasourceOperations datasourceOperations = getDatasourceOperations();
+ int schemaVersion =
+ JdbcBasePersistenceImpl.loadSchemaVersion(
+ datasourceOperations,
+ configurationStore.getConfiguration(
+ realmContext,
BehaviorChangeConfiguration.SCHEMA_VERSION_FALL_BACK_ON_DNE));
+ // skip validation if no schema is specified.
+ int requestedSchemaVersion = getSchemaVersion(bootstrapOptions);
+ Preconditions.checkState(
+ (requestedSchemaVersion == schemaVersion)
+ || (schemaVersion == 0 || requestedSchemaVersion == -1),
Review Comment:
Wait, what exactly are we trying to do here? If the metastore is already
bootstrapped with _any_ schema version, shouldn't bootstrapping fail? We don't
support "upgrades" (e.g. type changes).
--
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]