{"record":{"id":"6eaff29698cc9092","repo":"apache/seatunnel","slug":"scan-batch-failed","errorCode":"SCAN_BATCH_FAILED","errorMessage":"routing.toString() (DorisConnectorException SCAN_BATCH_FAILED, cause ex)","messagePattern":"routing\\.toString\\(\\) \\(DorisConnectorException SCAN_BATCH_FAILED, cause ex\\)","errorType":"error_code","errorClass":"DorisConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java","lineNumber":159,"sourceCode":"                    continue;\n                }\n                if (!TStatusCode.OK.equals(result.getStatus().getStatusCode())) {\n                    log.warn(\n                            \"The status of open scanner result from {} is '{}', error message is: {}.\",\n                            routing,\n                            result.getStatus().getStatusCode(),\n                            result.getStatus().getErrorMsgs());\n                    continue;\n                }\n                return result;\n            } catch (TException e) {\n                log.warn(\"Open scanner from {} failed.\", routing, e);\n                ex = e;\n            }\n        }\n        log.error(ErrorMessages.CONNECT_FAILED_MESSAGE, routing);\n        //        throw new ConnectedFailedException(routing.toString(), ex);\n        throw new DorisConnectorException(\n                DorisConnectorErrorCode.SCAN_BATCH_FAILED, routing.toString(), ex);\n    }\n\n    /**\n     * get next row batch from Doris BE\n     *\n     * @param nextBatchParams thrift struct to required by request\n     * @return scan batch result\n     * @throws DorisConnectorException throw if cannot connect to Doris BE\n     */\n    public TScanBatchResult getNext(TScanNextBatchParams nextBatchParams) {\n        log.debug(\"GetNext to '{}', parameter is '{}'.\", routing, nextBatchParams);\n        if (!isConnected) {\n            open();\n        }\n        TException ex = null;\n        TScanBatchResult result = null;\n        for (int attempt = 0; attempt < retries; ++attempt) {","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java#L141-L177","documentation":"BackendClient.openScanner exhausts its retry attempts to open an external data scanner on the Doris BE (connection failures, TException, or non-OK status); it logs the last cause and throws DorisConnectorException(SCAN_BATCH_FAILED), meaning scan initialization failed on every reachable backend.","triggerScenarios":"Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java:159 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect BE logs for the underlying open_scanner error (tablet missing, version GCed, memory limit)","Retry the job; transient BE overload or tablet migration often resolves","Verify query timeout and tablet availability for the requested partitions"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}