{"record":{"id":"acdb1f29aeddd52e","repo":"apache/seatunnel","slug":"stream-load-failed-acdb1f","errorCode":"STREAM_LOAD_FAILED","errorMessage":"${errorMessageByStreamLoad}","messagePattern":"\\$\\{errorMessageByStreamLoad\\}","errorType":"error_code","errorClass":"DorisConnectorException","httpStatus":null,"severity":"critical","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/RecordBuffer.java","lineNumber":143,"sourceCode":"        if (currentReadBuffer.limit() == 0) {\n            recycleBuffer(currentReadBuffer);\n            currentReadBuffer = null;\n            checkState(readQueue.isEmpty());\n            return -1;\n        }\n        int available = currentReadBuffer.remaining();\n        int nRead = Math.min(available, buf.length);\n        currentReadBuffer.get(buf, 0, nRead);\n        if (currentReadBuffer.remaining() == 0) {\n            recycleBuffer(currentReadBuffer);\n            currentReadBuffer = null;\n        }\n        return nRead;\n    }\n\n    private void checkErrorMessageByStreamLoad() {\n        if (errorMessageByStreamLoad != null) {\n            throw new DorisConnectorException(\n                    DorisConnectorErrorCode.STREAM_LOAD_FAILED, errorMessageByStreamLoad);\n        }\n    }\n\n    private void recycleBuffer(ByteBuffer buffer) throws InterruptedException {\n        ((Buffer) buffer).clear();\n        while (!writeQueue.offer(buffer, 100, TimeUnit.MILLISECONDS)) {\n            checkErrorMessageByStreamLoad();\n        }\n    }\n}\n","sourceCodeStart":125,"sourceCodeEnd":155,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/RecordBuffer.java#L125-L155","documentation":"RecordBuffer stores an asynchronous error message captured from the Doris stream load HTTP response (set by a background reader thread) and rethrows it as a DorisConnectorException on the next buffer operation via checkErrorMessageByStreamLoad. It surfaces a stream load that Doris rejected mid-flight on the thread performing data writes.","triggerScenarios":"stopBufferData, write, read, or recycleBuffer run while errorMessageByStreamLoad was populated by a failed HTTP stream load (e.g. non-200, 'Fail', label conflict, OLAP_ERR errors).","commonSituations":"Doris rejected the load due to schema mismatch (column count/type), bad data format (unselectable/failed rows exceeding max_filter_ratio), label already exists, or BE unavailable during flush.","solutions":["Read the embedded errorMessageByStreamLoad detail — it names the actual Doris failure (schema, label, data quality)","Verify table schema matches the sink's column list and SeaTunnel row types","Check Doris BE logs and the load error URL in the message for bad-row details","Ensure the label generator avoids duplicate labels after restarts"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// validate schema/data before sink\n// ensure row arity and types match the Doris target table schema","typeGuard":null,"tryCatchPattern":"try { writer.write(row); } catch (DorisConnectorException e) { LOG.error(\"stream load rejected: {}\", e.getMessage()); throw e; }","preventionTips":["Match SeaTunnel row schema exactly to Doris table columns","Set max_filter_ratio appropriately or clean bad data","Ensure unique load labels across restarts","Monitor BE availability during writes"],"tags":["doris","stream-load","async-error","data-quality"],"backgroundTag":"api-error-response","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"}