apache/seatunnel · warning

Graph read operation failed on attempt

Error message

Graph read operation failed on attempt {}/{}. Error: {}

What it means

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.

Solutions

  1. Allow retries to proceed; schema lookups usually succeed on the next attempt
  2. Check server responsiveness (curl the schema endpoint) if retries keep failing
  3. Increase timeout/retry settings for heavily loaded HugeGraph instances
  4. Ensure server stability before launching large sink jobs that do many schema lookups
Defensive patterns

Strategy: retry

Validate before calling

// Pre-flight schema endpoint check
curl -sf http://hugegraph:8080/graphs/<graph>/schema/propertykeys

Try / catch

try {
    schemaReady = client.getPropertyKeyOrNull(key);
} catch (HugeGraphConnectorException e) {
    // retries exhausted during schema discovery; fail fast with context
    throw new IllegalStateException("Schema lookup failed for " + key, e);
}

Prevention

When it happens

Trigger: Schema discovery/read calls during sink initialization (getPropertyKey, getPropertyKeyOrNull, getVertexLabelOrNull, createPropertyKeyIfNotExist, createVertexLabelIfNotExist, createEdgeLabelIfNotExist) hit a retryable transport error (timeout, connection reset) and attempt < totalAttempts.

Common situations: 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.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/396a210e0b963688. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/client/HugeGraphClient.java:327

        }
        return true;
    }

    private <T> T executeReadOperation(ReadOperation<T> operation) {
        int totalAttempts = this.maxRetries + 1;
        for (int attempt = 1; attempt <= totalAttempts; attempt++) {
            try {
                ensureClientInitialized();
                return operation.execute();
            } catch (ServerException | ClientException e) {
                if (!isRetryable(e)) {
                    LOG.error("Server rejected the request (non-retryable): {}", e.getMessage());
                    throw new HugeGraphConnectorException(
                            HugeGraphConnectorErrorCode.GRAPH_OPERATION_FAILED,
                            "Server rejected the request (non-retryable): " + e.getMessage(),
                            e);
                }
                LOG.warn(
                        "Graph read operation failed on attempt {}/{}. Error: {}",
                        attempt,
                        totalAttempts,
                        e.getMessage());
                reconnect();

                if (attempt == totalAttempts) {
                    LOG.error("Max retries ({}) reached. Failing task.", this.maxRetries);
                    throw new HugeGraphConnectorException(
                            HugeGraphConnectorErrorCode.GRAPH_OPERATION_FAILED,
                            "Failed to execute graph read operation after "
                                    + totalAttempts
                                    + " attempt(s). Last error: "
                                    + e.getMessage(),
                            e);
                }

                sleepBeforeRetry(attempt);

View on GitHub (pinned to cf67b549a7)