apache/seatunnel · warning
Failed to check JDBC savepoint support; fallback to full…
Error message
Failed to check JDBC savepoint support; fallback to full transaction rollback.
What it means
JdbcSinkWriter.supportsSavepoints() queries DatabaseMetaData.supportsSavepoints() once and caches the result. If the metadata call throws SQLException (connection dropped, DB error), the flag is conservatively set to false and this WARN says the writer will fall back to rolling back whole transactions instead of using savepoints.
Solutions
- Verify the connection is alive / pool validation is configured
- Re-run the job — the check is retried on a fresh connection
- Grant the DB user permission to read metadata if restricted
- Upgrade the driver if supportsSavepoints() is broken there
Defensive patterns
Strategy: try-catch
Validate before calling
// preflight metadata check on a fresh connection
try (Connection c = ds.getConnection()) {
boolean ok = c.getMetaData().supportsSavepoints();
log.info("savepoints supported: {}", ok);
} Try / catch
try {
supports = conn.getMetaData().supportsSavepoints();
} catch (SQLException e) {
supports = false; // safe fallback: full rollback
log.warn("savepoint check failed, using full rollback", e);
} Prevention
- Enable Hikari connection validation to avoid stale connections
- Grant users metadata access
- Retry the job once if the warning appears on first use
When it happens
Trigger: First call to supportsSavepoints() while the pooled connection's metadata is unreadable: stale/broken connection, permission restrictions on metadata, driver not implementing supportsSavepoints properly.
Common situations: Connection invalidated by idle timeout or network reset right before the check; restricted DB user (metadata disabled); older drivers throwing on metadata calls.
Understand the failure class
Background: "query failed", "%w: SQL error" — wrapped database query errors in Go libraries explained — this error's family across 3 libraries.
Related errors
- Catalog not found, loading tables from jdbc directly. url
- Failed to get approximate row count from table status…
- Failed to get clickhouse server config
- Range string split failed for table
- Range string split failed for table
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/db08a69f544a3a17.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkWriter.java:415
return true;
} catch (SQLException e) {
throw new JdbcConnectorException(
JdbcConnectorErrorCode.TRANSACTION_OPERATION_FAILED,
"set savepoint failed," + e.getMessage(),
e);
}
}
private boolean supportsSavepoints() {
if (supportsSavepoints != null) {
return supportsSavepoints;
}
try {
DatabaseMetaData metaData = connectionProvider.getConnection().getMetaData();
supportsSavepoints = metaData != null && metaData.supportsSavepoints();
} catch (SQLException e) {
supportsSavepoints = false;
log.warn(
"Failed to check JDBC savepoint support; fallback to full transaction rollback.",
e);
}
return supportsSavepoints;
}
private void logSavepointUnsupported() {
if (savepointUnsupportedLogged) {
return;
}
savepointUnsupportedLogged = true;
log.warn(
"JDBC driver does not support savepoints. Row-error handling will keep "
+ "auto-flushed rows pending until checkpoint commit and fall back to full "
+ "transaction rollback on row-level write failure. table={}",
sinkTablePath);
}
View on GitHub (pinned to cf67b549a7)