apache/seatunnel · error · NebulaGraphConnectorException

WRITE_FAILED

WRITE_FAILED

Error message

Failed to flush the NebulaGraph sink before commit.

What it means

NebulaGraphSinkWriter.prepareCommit() flushes buffered writes and, if the flush threw an IOException, rethrows it as NebulaGraphConnectorException with WRITE_FAILED. Checkpointing therefore fails when pending vertex writes could not be sent, preserving exactly-once/at-least-once semantics rather than silently committing incomplete data.

Source

Thrown at seatunnel-connectors-v2/connector-nebulagraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/nebulagraph/sink/NebulaGraphSinkWriter.java:89

        }
        if (rowKind == RowKind.UPDATE_BEFORE) {
            return;
        }

        buffer.add(converter.convert(row));
        if (buffer.size() >= config.getBatchSize()) {
            flush();
        }
    }

    @Override
    public Optional<Void> prepareCommit() {
        try {
            ensureWritable();
            flush();
            return Optional.empty();
        } catch (IOException e) {
            throw new NebulaGraphConnectorException(
                    NebulaGraphConnectorErrorCode.WRITE_FAILED,
                    "Failed to flush the NebulaGraph sink before commit.",
                    e);
        }
    }

    @Override
    public void close() throws IOException {
        if (closed) {
            return;
        }
        IOException failure = null;
        if (!failed) {
            try {
                flush();
            } catch (IOException e) {
                failure = e;
            }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Look at the cause chain for the underlying flush failure (likely errors 2126/2127)
  2. Verify Nebula schema matches the written tag/properties, then restart from the last checkpoint
  3. Ensure the Nebula cluster is healthy (leaders balanced, storage up) before rerunning
  4. Add retry/timeout tuning on the Nebula client for transient failures
Defensive patterns

Strategy: try-catch

Try / catch

try {
    writer.prepareCommit();
} catch (NebulaGraphConnectorException e) {
    LOG.error("Checkpoint flush failed; aborting checkpoint", e.getCause());
    throw e; // fail the checkpoint, recover from last snapshot
}

Prevention

When it happens

Trigger: prepareCommit is called at checkpoint boundary while the buffer contains data; flush() -> client.execute throws IOException (server rejection or transport error).

Common situations: Nebula server rejected the batch (schema mismatch, leader change) during checkpoint; network interruption exactly at checkpoint time; failing e2e test 'flushesAtBatchBoundaryAndCheckpoint' when graphd is unavailable.

Related errors


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