{"record":{"id":"04f3140294c392e3","repo":"apache/seatunnel","slug":"interrupted-during-doris-retry-backoff","errorCode":null,"errorMessage":"Interrupted during Doris retry backoff","messagePattern":"Interrupted during Doris retry backoff","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/committer/DorisCommitter.java","lineNumber":276,"sourceCode":"            } else {\n                log.info(\"load result {}\", loadResult);\n            }\n        }\n    }\n\n    private void sleepBeforeNextAttempt(int attempt) throws IOException {\n        if (attempt < maxRetry) {\n            retrySleeper.sleep(attempt + 1);\n        }\n    }\n\n    private static void sleepBeforeRetry(int retry) throws IOException {\n        try {\n            int shift = Math.min(Math.max(retry - 1, 0), 4);\n            Thread.sleep(1000L * (1L << shift));\n        } catch (InterruptedException ie) {\n            Thread.currentThread().interrupt();\n            throw new IOException(\"Interrupted during Doris retry backoff\", ie);\n        }\n    }\n\n    private void handleAbortSuccess(DorisCommitInfo committable, CloseableHttpResponse response)\n            throws IOException {\n        ObjectMapper mapper = new ObjectMapper();\n        String loadResult = EntityUtils.toString(response.getEntity());\n        Map<String, String> res =\n                mapper.readValue(loadResult, new TypeReference<HashMap<String, String>>() {});\n        if (!LoadStatus.SUCCESS.equals(res.get(\"status\"))) {\n            if (ResponseUtil.isCommitted(res.get(\"msg\"))) {\n                throw new DorisConnectorException(\n                        DorisConnectorErrorCode.STREAM_LOAD_FAILED,\n                        \"try abort committed transaction, \" + \"do you recover from old savepoint?\");\n            }\n            log.warn(\n                    \"Fail to abort transaction. txnId: {}, error: {}\",\n                    committable.getTxbID(),","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/committer/DorisCommitter.java#L258-L294","documentation":"The Doris committer sleeps with exponential backoff (1s, 2s, 4s, 8s, 16s capped) between HTTP retries. If the sleeping thread is interrupted, it re-asserts the interrupt flag and throws this IOException so the commit/abort operation unwinds promptly instead of silently resuming retries.","triggerScenarios":"Thread.interrupt() is delivered while sleepBeforeRetry is in Thread.sleep — typically when the SeaTunnel engine cancels the job, a checkpoint timeout triggers task cancellation, or the JVM is shutting down.","commonSituations":"User cancels the SeaTunnel job while a Doris retry backoff is in progress; checkpoint expired and the engine interrupts the task thread; cluster shutdown.","solutions":["This usually accompanies an intentional cancellation — check the job/engine logs for the original cancel reason","If it happens during long retries, fix the underlying Doris connectivity so retries don't stack up","Reduce checkpoint/transaction timeout mismatch so the job fails cleanly rather than retrying until cancellation","No code fix needed; the interrupt flag is properly restored by the connector"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { committer.commit(c); } catch (IOException e) { if (e.getMessage().contains(\"Interrupted during Doris retry backoff\")) { /* job is being cancelled; do not swallow — restore/cleanup and exit */ Thread.currentThread().interrupt(); } }","preventionTips":["Fix underlying Doris connectivity so retries rarely trigger","Align checkpoint timeouts with retry budget to fail fast instead of being interrupted","Treat this as a cancellation signal, not a Doris failure"],"tags":["doris","retry","interrupt","cancellation"],"backgroundTag":"request-timeout","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"}