Skip to content

Commit

Permalink
Fix metadata listing failure in case of concurrent table deletion in …
Browse files Browse the repository at this point in the history
…Phoenix
  • Loading branch information
ebyhr committed Feb 24, 2022
1 parent 5abd6f5 commit 612b7db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,10 @@ public Map<String, Object> getTableProperties(ConnectorSession session, JdbcTabl
}
}
}
catch (org.apache.phoenix.schema.TableNotFoundException e) {
// Rethrow as Trino TableNotFoundException to suppress the exception during listing information_schema
throw new io.trino.spi.connector.TableNotFoundException(new SchemaTableName(handle.getSchemaName(), handle.getTableName()));
}
catch (IOException | SQLException e) {
throw new TrinoException(PHOENIX_METADATA_ERROR, "Couldn't get Phoenix table properties", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,10 @@ public Map<String, Object> getTableProperties(ConnectorSession session, JdbcTabl
}
}
}
catch (org.apache.phoenix.schema.TableNotFoundException e) {
// Rethrow as Trino TableNotFoundException to suppress the exception during listing information_schema
throw new io.trino.spi.connector.TableNotFoundException(new SchemaTableName(handle.getSchemaName(), handle.getTableName()));
}
catch (IOException | SQLException e) {
throw new TrinoException(PHOENIX_METADATA_ERROR, "Couldn't get Phoenix table properties", e);
}
Expand Down

0 comments on commit 612b7db

Please sign in to comment.