This is an automated email from the ASF dual-hosted git repository.
emaynard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 831907815 Remove logging for DbOps (#1433)
831907815 is described below
commit 8319078154b60c3108d15705d277be106c7ab635
Author: Prashant Singh <[email protected]>
AuthorDate: Wed Apr 23 14:12:07 2025 -0700
Remove logging for DbOps (#1433)
---
.../relational/jdbc/DatasourceOperations.java | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git
a/extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/DatasourceOperations.java
b/extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/DatasourceOperations.java
index 64e7b9bd5..4884dde4e 100644
---
a/extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/DatasourceOperations.java
+++
b/extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/DatasourceOperations.java
@@ -77,11 +77,8 @@ public class DatasourceOperations {
if (line.endsWith(";")) { // Execute statement when semicolon is
found
String sql = sqlBuffer.toString().trim();
try {
- int rowsUpdated = statement.executeUpdate(sql);
- LOGGER.debug("Query {} executed {} rows affected", sql,
rowsUpdated);
+ statement.executeUpdate(sql);
} catch (SQLException e) {
- LOGGER.error("Error executing query {}", sql, e);
- // re:throw this as unhandled exception
throw new RuntimeException(e);
}
sqlBuffer.setLength(0); // Clear the buffer for the next
statement
@@ -92,11 +89,7 @@ public class DatasourceOperations {
connection.setAutoCommit(autoCommit);
}
} catch (IOException e) {
- LOGGER.debug("Error reading the script file", e);
throw new RuntimeException(e);
- } catch (SQLException e) {
- LOGGER.debug("Error executing the script file", e);
- throw e;
}
}
@@ -135,7 +128,6 @@ public class DatasourceOperations {
}
return resultList;
} catch (SQLException e) {
- LOGGER.debug("Error executing query {}", query, e);
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
@@ -156,9 +148,6 @@ public class DatasourceOperations {
connection.setAutoCommit(true);
try {
return statement.executeUpdate(query);
- } catch (SQLException e) {
- LOGGER.debug("Error executing query {}", query, e);
- throw e;
} finally {
connection.setAutoCommit(autoCommit);
}
@@ -188,9 +177,6 @@ public class DatasourceOperations {
}
connection.setAutoCommit(autoCommit);
}
- } catch (SQLException e) {
- LOGGER.debug("Caught Error while executing transaction", e);
- throw e;
}
}