{"record":{"id":"d83ffba085724c7e","repo":"apache/seatunnel","slug":"closing-httpclient-failed","errorCode":null,"errorMessage":"Closing httpClient failed.","messagePattern":"Closing httpClient failed\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisStreamLoad.java","lineNumber":375,"sourceCode":"                        \"try abort committed transaction, \" + \"do you recover from old savepoint?\");\n            }\n            log.warn(\"Fail to abort transaction. txnId: {}, error: {}\", txnID, res.get(\"msg\"));\n        }\n    }\n\n    public void close() throws IOException {\n        if (null != streamLoadHttpClient) {\n            try {\n                streamLoadHttpClient.close();\n            } catch (IOException e) {\n                throw new IOException(\"Closing streamLoadHttpClient failed.\", e);\n            }\n        }\n        if (null != httpClient) {\n            try {\n                httpClient.close();\n            } catch (IOException e) {\n                throw new IOException(\"Closing httpClient failed.\", e);\n            }\n        }\n        if (null != executorService) {\n            executorService.shutdownNow();\n        }\n    }\n}\n","sourceCodeStart":357,"sourceCodeEnd":383,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisStreamLoad.java#L357-L383","documentation":"DorisStreamLoad.close() wraps any IOException thrown while closing the general-purpose Apache HttpClient and rethrows it as 'Closing httpClient failed.'. Same intent as the sibling streamLoadHttpClient error, but for the shared sync client.","triggerScenarios":"closeStreamLoadQuietly invokes DorisStreamLoad.close() while httpClient != null and its close() throws an IOException.","commonSituations":"Connections still leased during failover; abrupt task cancellation; interrupted close during shutdown.","solutions":["Check the wrapped cause for the real failure","Ensure abort/commit of 2PC transactions completes before writer close","Treat as benign if it occurs during job teardown with recovered state","Report/upgrade if it reproduces on every checkpoint-triggered close"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { streamLoad.close(); } catch (IOException e) { LOG.warn(\"close failed\", e); /* inspect cause */ }","preventionTips":["Ensure connections are released before close","Avoid abrupt cancellation when possible","Inspect cause chain for leaked connections"],"tags":["doris","io","http-client","resource-cleanup"],"backgroundTag":"broken-pipe","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"}