{"record":{"id":"9fdda2c0f287bdef","repo":"apache/seatunnel","slug":"write-failed-9fdda2","errorCode":"WRITE_FAILED","errorMessage":"Failed to flush the NebulaGraph sink before commit.","messagePattern":"Failed to flush the NebulaGraph sink before commit\\.","errorType":"error_code","errorClass":"NebulaGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-nebulagraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/nebulagraph/sink/NebulaGraphSinkWriter.java","lineNumber":89,"sourceCode":"        }\n        if (rowKind == RowKind.UPDATE_BEFORE) {\n            return;\n        }\n\n        buffer.add(converter.convert(row));\n        if (buffer.size() >= config.getBatchSize()) {\n            flush();\n        }\n    }\n\n    @Override\n    public Optional<Void> prepareCommit() {\n        try {\n            ensureWritable();\n            flush();\n            return Optional.empty();\n        } catch (IOException e) {\n            throw new NebulaGraphConnectorException(\n                    NebulaGraphConnectorErrorCode.WRITE_FAILED,\n                    \"Failed to flush the NebulaGraph sink before commit.\",\n                    e);\n        }\n    }\n\n    @Override\n    public void close() throws IOException {\n        if (closed) {\n            return;\n        }\n        IOException failure = null;\n        if (!failed) {\n            try {\n                flush();\n            } catch (IOException e) {\n                failure = e;\n            }","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-nebulagraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/nebulagraph/sink/NebulaGraphSinkWriter.java#L71-L107","documentation":"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.","triggerScenarios":"prepareCommit is called at checkpoint boundary while the buffer contains data; flush() -> client.execute throws IOException (server rejection or transport error).","commonSituations":"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.","solutions":["Look at the cause chain for the underlying flush failure (likely errors 2126/2127)","Verify Nebula schema matches the written tag/properties, then restart from the last checkpoint","Ensure the Nebula cluster is healthy (leaders balanced, storage up) before rerunning","Add retry/timeout tuning on the Nebula client for transient failures"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    writer.prepareCommit();\n} catch (NebulaGraphConnectorException e) {\n    LOG.error(\"Checkpoint flush failed; aborting checkpoint\", e.getCause());\n    throw e; // fail the checkpoint, recover from last snapshot\n}","preventionTips":["Ensure Nebula cluster health before enabling checkpoints","Resolve underlying flush errors (schema, connectivity) quickly","Monitor checkpoint failure rates for the Nebula sink","Keep buffer sizes small so flushes are fast at commit time"],"tags":["nebulagraph","checkpoint","write-failed","flush"],"backgroundTag":"checkpoint-flush-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}