{"record":{"id":"bb308a11917a41f6","repo":"apache/seatunnel","slug":"operation-retry-interrupted","errorCode":"OPERATION_RETRY_INTERRUPTED","errorMessage":"Graph operation retry was interrupted","messagePattern":"Graph operation retry was interrupted","errorType":"error_code","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/client/HugeGraphClient.java","lineNumber":390,"sourceCode":"                throw new HugeGraphConnectorException(\n                        HugeGraphConnectorErrorCode.GRAPH_OPERATION_FAILED,\n                        \"Non-retryable error executing graph read operation\",\n                        e);\n            }\n        }\n        throw new HugeGraphConnectorException(\n                HugeGraphConnectorErrorCode.GRAPH_OPERATION_FAILED,\n                \"Failed to execute graph read operation\");\n    }\n\n    private void sleepBeforeRetry(int attempt) {\n        long delay = computeBackoffMs(retryBackoffMs, retryBackoffMaxMs, attempt);\n        try {\n            LOG.info(\"Will retry in {} ms (attempt {})...\", delay, attempt);\n            Thread.sleep(delay);\n        } catch (InterruptedException ie) {\n            Thread.currentThread().interrupt();\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.OPERATION_RETRY_INTERRUPTED,\n                    \"Graph operation retry was interrupted\",\n                    ie);\n        }\n    }\n\n    /**\n     * Exponential backoff: {@code baseMs * 2^(attempt-1)}, capped at {@code maxMs} (a non-positive\n     * {@code maxMs} means no cap). The shift is bounded so a large {@code maxRetries} cannot\n     * overflow. {@code attempt} is 1-based (the first retry uses the base delay).\n     */\n    static long computeBackoffMs(long baseMs, long maxMs, int attempt) {\n        if (baseMs <= 0) {\n            return 0;\n        }\n        int shift = Math.min(Math.max(attempt - 1, 0), 30);\n        long scaled = baseMs << shift;\n        if (scaled < 0) {","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/client/HugeGraphClient.java#L372-L408","documentation":"Thrown by HugeGraphClient.sleepBeforeRetry when the retry backoff sleep between graph operation attempts is interrupted (InterruptedException), aborting the retry loop for a HugeGraph REST/graph operation.","triggerScenarios":"Thrown at seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/client/HugeGraphClient.java:390 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check whether the job/task was intentionally cancelled; if so, treat interruption as shutdown","Avoid saturating HugeGraph so operations succeed on the first attempt and no backoff sleep occurs","Restore the interrupt status in a catch block and propagate a clean shutdown"],"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"}