{"record":{"id":"08205a146be198f2","repo":"apache/seatunnel","slug":"the-status-of-get-next-result-from-is-err","errorCode":null,"errorMessage":"The status of get next result from {} is '{}', error message is: {}.","messagePattern":"The status of get next result from (.+?) is '(.+?)', error message is: (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java","lineNumber":186,"sourceCode":"     * @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) {\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());","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java#L168-L204","documentation":"Doris BackendClient.getNext() fetches the next scan batch from a backend via Thrift; when TScanNextResult status is not OK it logs 'The status of get next result from {} is ...' at WARN and tries the next routing. This indicates the backend failed mid-scan (after openScanner succeeded).","triggerScenarios":"Non-OK TStatusCode on getNext: scan timeout on the BE, query cancelled, memory limit exceeded on the backend, or BE lost the scanner context (BE restart) between openScanner and getNext.","commonSituations":"Large scans hitting Doris query timeout or mem limits; BE restarting/OOM mid-scan; long-running read where the scanner context expires; cluster instability during bulk reads.","solutions":["Read errorMsgs in the log line for the Doris-side cause (timeout, memory limit, cancelled).","Increase Doris query timeout / memory limits (query_timeout, mem_limit) for large scans.","Check BE stability (SHOW BACKENDS, BE logs) and retry after the cluster is healthy.","Retry the job; the client rotates to another backend, but a persistent error requires fixing the Doris-side condition."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// pre-check cluster capacity for long scans\n// SHOW VARIABLES LIKE 'query_timeout';\n// SHOW VARIABLES LIKE 'mem_limit';\n// SHOW BACKENDS; -- ensure stable BEs","typeGuard":null,"tryCatchPattern":"try {\n    client.getNext(nextBatchParams);\n} catch (TException e) {\n    // reconnect / reopen scanner, rotate to next routing\n}","preventionTips":["Raise query_timeout and memory limits for large scans","Ensure BEs are stable (no OOM/restarts) during bulk reads","Keep scan sessions short enough to avoid scanner context expiry","Retry after checking BE logs for the mid-scan failure reason"],"tags":["doris","backend","thrift","scanner","timeout"],"backgroundTag":"upstream-api-error","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"}