eric-maynard commented on code in PR #2653:
URL: https://github.com/apache/polaris/pull/2653#discussion_r2379865685


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcBasePersistenceImpl.java:
##########
@@ -736,6 +737,9 @@ static int loadSchemaVersion(DatasourceOperations 
datasourceOperations) {
       return schemaVersion.getFirst().getValue();
     } catch (SQLException e) {
       LOGGER.error("Failed to load schema version due to {}", e.getMessage(), 
e);
+      if (fallbackOnDoesNotExist && e.getMessage().contains("does not exist")) 
{
+        return SchemaVersion.MINIMUM.getValue();
+      }

Review Comment:
   Is there a particular error code we want to catch in postgres? 
   
   If so, perhaps `DatasourceOperations` would be a good place for this check, 
something in the vein of `isConstraintViolation`.
   
   In my mind this check will go away after some time, once we can reasonably 
expect to stop supporting pre-1 schema versions. So if it's a best-effort check 
that only works for a metastore backend or two, that's okay with me.



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