{"record":{"id":"396a210e0b963688","repo":"apache/seatunnel","slug":"graph-read-operation-failed-on-attempt-erro","errorCode":null,"errorMessage":"Graph read operation failed on attempt {}/{}. Error: {}","messagePattern":"Graph read operation failed on attempt (.+?)/(.+?)\\. Error: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/client/HugeGraphClient.java","lineNumber":327,"sourceCode":"        }\n        return true;\n    }\n\n    private <T> T executeReadOperation(ReadOperation<T> operation) {\n        int totalAttempts = this.maxRetries + 1;\n        for (int attempt = 1; attempt <= totalAttempts; attempt++) {\n            try {\n                ensureClientInitialized();\n                return operation.execute();\n            } catch (ServerException | ClientException e) {\n                if (!isRetryable(e)) {\n                    LOG.error(\"Server rejected the request (non-retryable): {}\", e.getMessage());\n                    throw new HugeGraphConnectorException(\n                            HugeGraphConnectorErrorCode.GRAPH_OPERATION_FAILED,\n                            \"Server rejected the request (non-retryable): \" + e.getMessage(),\n                            e);\n                }\n                LOG.warn(\n                        \"Graph read operation failed on attempt {}/{}. Error: {}\",\n                        attempt,\n                        totalAttempts,\n                        e.getMessage());\n                reconnect();\n\n                if (attempt == totalAttempts) {\n                    LOG.error(\"Max retries ({}) reached. Failing task.\", this.maxRetries);\n                    throw new HugeGraphConnectorException(\n                            HugeGraphConnectorErrorCode.GRAPH_OPERATION_FAILED,\n                            \"Failed to execute graph read operation after \"\n                                    + totalAttempts\n                                    + \" attempt(s). Last error: \"\n                                    + e.getMessage(),\n                            e);\n                }\n\n                sleepBeforeRetry(attempt);","sourceCodeStart":309,"sourceCodeEnd":345,"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#L309-L345","documentation":"WARN from HugeGraphClient.executeReadOperation when a read/schema-lookup call (e.g. getPropertyKey, createVertexLabelIfNotExist) fails on a retryable error and will be retried after reconnect(). Non-retryable server rejections are logged as ERROR and thrown immediately. If all attempts fail, an exception with BUILD_CLIENT_FAILED is raised.","triggerScenarios":"Schema discovery/read calls during sink initialization (getPropertyKey, getPropertyKeyOrNull, getVertexLabelOrNull, createPropertyKeyIfNotExist, createVertexLabelIfNotExist, createEdgeLabelIfNotExist) hit a retryable transport error (timeout, connection reset) and attempt < totalAttempts.","commonSituations":"HugeGraph server briefly restarting while a job initializes, slow schema endpoint responses under load, network instability between worker and server, or LB dropping idle connections before the first schema lookups.","solutions":["Allow retries to proceed; schema lookups usually succeed on the next attempt","Check server responsiveness (curl the schema endpoint) if retries keep failing","Increase timeout/retry settings for heavily loaded HugeGraph instances","Ensure server stability before launching large sink jobs that do many schema lookups"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-flight schema endpoint check\ncurl -sf http://hugegraph:8080/graphs/<graph>/schema/propertykeys","typeGuard":null,"tryCatchPattern":"try {\n    schemaReady = client.getPropertyKeyOrNull(key);\n} catch (HugeGraphConnectorException e) {\n    // retries exhausted during schema discovery; fail fast with context\n    throw new IllegalStateException(\"Schema lookup failed for \" + key, e);\n}","preventionTips":["Start sink jobs only after the HugeGraph service passes health checks","Increase read timeouts when the server is under heavy schema/load pressure","Avoid job storms that hammer schema endpoints simultaneously at startup","Keep retry counts high for initialization-phase reads (cheap and idempotent)"],"tags":["hugegraph","retry","read","schema"],"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-23T08:17:48.524Z"}