{"record":{"id":"0f1e2273176bc483","repo":"apache/seatunnel","slug":"get-next-from-failed","errorCode":null,"errorMessage":"Get next from {} failed.","messagePattern":"Get next from (.+?) failed\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java","lineNumber":195,"sourceCode":"        for (int attempt = 0; attempt < retries; ++attempt) {\n            log.debug(\"Attempt {} to getNext {}.\", attempt, routing);\n            try {\n                result = client.getNext(nextBatchParams);\n                if (result == null) {\n                    log.warn(\"GetNext result from {} is null.\", routing);\n                    continue;\n                }\n                if (!TStatusCode.OK.equals(result.getStatus().getStatusCode())) {\n                    log.warn(\n                            \"The status of get next 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(\"Get next from {} failed.\", routing, e);\n                ex = e;\n            }\n        }\n        if (result != null && (TStatusCode.OK != (result.getStatus().getStatusCode()))) {\n            log.error(\n                    ErrorMessages.DORIS_INTERNAL_FAIL_MESSAGE,\n                    routing,\n                    result.getStatus().getStatusCode(),\n                    result.getStatus().getErrorMsgs());\n            //            throw new DorisInternalException(routing.toString(),\n            // result.getStatus().getStatusCode(),\n            //                    result.getStatus().getErrorMsgs());\n            String errMsg =\n                    \"Doris server \"\n                            + routing.toString()\n                            + \" internal failed, status code [\"\n                            + result.getStatus().getStatusCode()\n                            + \"] error message is \"","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java#L177-L213","documentation":"getNext catches TException from the batch RPC, logs this warning per attempt, and after retries are exhausted logs an error (DORIS_INTERNAL_FAIL_MESSAGE if the last result status was not OK, otherwise CONNECT_FAILED_MESSAGE) and throws. This signals the stream of scan batches from the BE could not continue due to a transport/RPC failure.","triggerScenarios":"client.getNext throws TException on every retry — connection dropped mid-stream, thrift deserialization failure on a large batch, BE crash, or timeout exceeded.","commonSituations":"Network instability during large table reads; batch responses exceeding thrift message size limits; BE OOM/crash under heavy scans; Doris upgrade restarting nodes mid-read.","solutions":["Read the logged TException stack trace to identify transport vs. protocol failure.","Lower the read batch size and/or increase timeouts and retries in connector options.","Confirm network stability between SeaTunnel workers and the BE.","Check BE logs and health; restart or repair failing BEs.","Upgrade connector to match the Doris server version if protocol errors appear."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// keep thrift payload within limits: batch size * row size < thrift_max_message_size\n// verify network stability from workers to BE before long jobs","typeGuard":null,"tryCatchPattern":"try {\n    batch = scanner.getNext();\n} catch (DorisConnectorException e) {\n    // all attempts threw TException; inspect logged stack trace for transport vs protocol cause, adjust size/timeout, retry\n}","preventionTips":["Tune doris.request.batch-size and connect/read timeouts together.","Check BE memory and avoid OOM-inducing large scans.","Use stable network paths; investigate packet loss if errors recur.","Align connector version with the Doris server version."],"tags":["thrift","doris","rpc","streaming","retry-exhausted"],"backgroundTag":"api-request-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"}