{"record":{"id":"89b443f9167f2c62","repo":"apache/seatunnel","slug":"commit-failed-89b443","errorCode":"COMMIT_FAILED","errorMessage":"commit failed with SQL: \" + copySQL + \" Commit error with status: \" + statusCode + \", Reason: \" + reasonPhrase + \", Response: \" + loadResult","messagePattern":"commit failed with SQL: \" \\+ copySQL \\+ \" Commit error with status: \" \\+ statusCode \\+ \", Reason: \" \\+ reasonPhrase \\+ \", Response: \" \\+ loadResult","errorType":"error_code","errorClass":"SelectDBConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-selectdb-cloud/src/main/java/org/apache/seatunnel/connectors/selectdb/rest/CopySQLUtil.java","lineNumber":99,"sourceCode":"                        hostPort,\n                        reasonPhrase);\n            } else if (response.getEntity() != null) {\n                loadResult = EntityUtils.toString(response.getEntity());\n                success = handleCommitResponse(loadResult);\n                if (success) {\n                    log.info(\n                            \"commit success cost {}ms, response is {}\",\n                            System.currentTimeMillis() - start,\n                            loadResult);\n                    break;\n                } else {\n                    log.warn(\"commit failed, retry again\");\n                }\n            }\n        }\n\n        if (!success) {\n            throw new SelectDBConnectorException(\n                    SelectDBConnectorErrorCode.COMMIT_FAILED,\n                    \"commit failed with SQL: \"\n                            + copySQL\n                            + \" Commit error with status: \"\n                            + statusCode\n                            + \", Reason: \"\n                            + reasonPhrase\n                            + \", Response: \"\n                            + loadResult);\n        }\n    }\n\n    private static boolean handleCommitResponse(String loadResult) throws IOException {\n        BaseResponse<CopyIntoResp> baseResponse =\n                OBJECT_MAPPER.readValue(\n                        loadResult, new TypeReference<BaseResponse<CopyIntoResp>>() {});\n        if (baseResponse.getCode() == LoadStatus.SUCCESS) {\n            CopyIntoResp dataResp = baseResponse.getData();","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-selectdb-cloud/src/main/java/org/apache/seatunnel/connectors/selectdb/rest/CopySQLUtil.java#L81-L117","documentation":"Thrown by CopySQLUtil.copyFileToDatabase (selectdb-cloud connector) after all retries when the COPY INTO commit fails. The message includes the executed copy SQL, the HTTP status code, the reason phrase, and the response body returned by the SelectDB/Doris FE.","triggerScenarios":"Submitting the COPY SQL to load staged file data and receiving a non-success HTTP status every retry, e.g. FE unreachable (connection error -> non-200), SQL parse errors, wrong label/database/table, or load failures inside the copy response.","commonSituations":"SelectDB/Doris cluster down or FE overloaded during load; malformed COPY SQL (bad table/column list); non-existent target database/table; insufficient privileges; all configured retries exhausted with persistent failure.","solutions":["Check the embedded status, reason, and response in the message for the server's specific error","Verify the target database/table exist and the SQL syntax is valid against SelectDB/Doris","Confirm the SelectDB FE/BE nodes are healthy and reachable from the connector host","Check user privileges for the LOAD/COPY operation and retry after fixing the cause","Increase retries or investigate network instability if failures are transient"],"exampleFix":"// before\nCOPY INTO db.wrong_table FROM ...\n// after\nCOPY INTO db.sales_orders (id, amount) FROM ...","handlingStrategy":"try-catch","validationCode":"// pre-check target table and cluster health\n// curl http://<fe>:8030/api/show_data?db=<db>\n// SHOW CREATE TABLE db.tbl; -- verify table and privileges","typeGuard":null,"tryCatchPattern":"try {\n    CopySQLUtil.copyFileToDatabase(...);\n} catch (SelectDBConnectorException e) {\n    log.error(\"COPY commit failed: {}\", e.getMessage()); // SQL, status, body embedded\n    // inspect FE health then decide: fix SQL / restart load\n    throw e;\n}","preventionTips":["Verify the target database/table exist and the account has LOAD privileges","Monitor SelectDB FE/BE health before large loads","Test the COPY SQL manually against the cluster first","Watch the embedded response body — it names the server-side load error"],"tags":["selectdb","doris","http","sql","load"],"backgroundTag":"sql-query-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}