{"record":{"id":"1e20160a364d7ad9","repo":"apache/seatunnel","slug":"sql-operation-failed-1e2016","errorCode":"SQL_OPERATION_FAILED","errorMessage":"close redshift jdbc client failed","messagePattern":"close redshift jdbc client failed","errorType":"error_code","errorClass":"S3RedshiftJdbcConnectorException","httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-s3-redshift/src/main/java/org/apache/seatunnel/connectors/seatunnel/redshift/commit/S3RedshiftSinkAggregatedCommitter.java","lineNumber":112,"sourceCode":"                    try {\n                        for (Map.Entry<String, LinkedHashMap<String, String>> entry :\n                                aggregatedCommitInfo.getTransactionMap().entrySet()) {\n                            // delete the transaction dir\n                            hadoopFileSystemProxy.deleteFile(entry.getKey());\n                        }\n                    } catch (Exception e) {\n                        log.error(\"abort aggregatedCommitInfo error \", e);\n                    }\n                });\n    }\n\n    @Override\n    public void close() throws IOException {\n        super.close();\n        try {\n            RedshiftJdbcClient.getInstance(pluginConfig).close();\n        } catch (SQLException e) {\n            throw new S3RedshiftJdbcConnectorException(\n                    CommonErrorCodeDeprecated.SQL_OPERATION_FAILED,\n                    \"close redshift jdbc client failed\",\n                    e);\n        }\n    }\n\n    private String convertSql(String path) {\n        return StringUtils.replace(executeSql, \"${path}\", path);\n    }\n}\n","sourceCodeStart":94,"sourceCodeEnd":123,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-s3-redshift/src/main/java/org/apache/seatunnel/connectors/seatunnel/redshift/commit/S3RedshiftSinkAggregatedCommitter.java#L94-L123","documentation":"S3RedshiftSinkAggregatedCommitter.close closes the shared RedshiftJdbcClient after committing. If RedshiftJdbcClient.close() throws SQLException it is wrapped as S3RedshiftJdbcConnectorException(SQL_OPERATION_FAILED, \"close redshift jdbc client failed\"). This happens during sink cleanup.","triggerScenarios":"Calling close() on the aggregated committer while the underlying JDBC connection is already dead/broken, causing the driver to throw SQLException on close.","commonSituations":"Network interruption during job teardown, connection killed server-side after the commit, or Redshift temporarily unavailable during shutdown.","solutions":["Check whether the commit itself succeeded — this failure is in cleanup and data is usually already committed","Inspect network/firewall logs for dropped connections to the Redshift endpoint during teardown","If it recurs, increase connection idle/keepalive settings on the JDBC URL"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    committer.close();\n} catch (S3RedshiftJdbcConnectorException e) {\n    if (e.getMessage().contains(\"close redshift jdbc client failed\")) {\n        log.warn(\"cleanup-only failure; verify commit result\", e);\n    } else throw e;\n}","preventionTips":["Treat close-time SQLExceptions as non-fatal when commit already succeeded","Enable JDBC keepalive so the connection survives idle teardown gaps","Check the commit transaction status in Redshift when this fires"],"tags":["jdbc","redshift","cleanup"],"backgroundTag":"database-query-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}