{"record":{"id":"48573452877f9363","repo":"apache/seatunnel","slug":"failed-to-write-buffersize-vertices-to-nebulagr","errorCode":null,"errorMessage":"Failed to write ${bufferSize} vertices to NebulaGraph tag '${tag}'. The writer will not retry this batch during close.","messagePattern":"Failed to write (.+?) vertices to NebulaGraph tag '(.+?)'\\. The writer will not retry this batch during close\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"critical","filePath":"seatunnel-connectors-v2/connector-nebulagraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/nebulagraph/sink/NebulaGraphSinkWriter.java","lineNumber":135,"sourceCode":"        } finally {\n            closed = true;\n        }\n        if (failure != null) {\n            throw failure;\n        }\n    }\n\n    private void flush() throws IOException {\n        if (buffer.isEmpty()) {\n            return;\n        }\n        NebulaGraphWriteRequest request = statementBuilder.build(buffer);\n        try {\n            client.execute(request.getStatement(), request.getParameters());\n            buffer.clear();\n        } catch (IOException | RuntimeException e) {\n            failed = true;\n            throw new IOException(\n                    \"Failed to write \"\n                            + buffer.size()\n                            + \" vertices to NebulaGraph tag '\"\n                            + config.getTag()\n                            + \"'. The writer will not retry this batch during close.\",\n                    e);\n        }\n    }\n\n    private void ensureWritable() throws IOException {\n        if (closed) {\n            throw new IOException(\"NebulaGraph sink writer is already closed.\");\n        }\n        if (failed) {\n            throw new IOException(\"NebulaGraph sink writer is in a failed state.\");\n        }\n    }\n","sourceCodeStart":117,"sourceCodeEnd":153,"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#L117-L153","documentation":"NebulaGraphSinkWriter.flush builds an nGQL request from the buffered vertices and executes it. On IOException or RuntimeException it marks the writer failed (failed=true, disabling retries during close), clears nothing, and throws an IOException reporting the batch size and target tag. The message warns the batch will not be retried during close to avoid duplicates/data issues.","triggerScenarios":"client.execute throws while flushing a non-empty vertex buffer — triggered from write() (buffer full), prepareCommit() (checkpoint), or close().","commonSituations":"Nebula unreachable or rejecting the batch (bad schema, leader change) at buffer-overflow time; oversized batch exceeding server limits; session expired mid-job; config tag name wrong.","solutions":["Inspect the cause chain for the underlying server/connection error","Verify the tag and property schema match (DESCRIBE TAG) and reduce batch size if limits are hit","Check Nebula cluster health (leader distribution, storaged status) and restore connectivity","After fixing, restart the job from the last successful checkpoint — this batch was marked failed and will not be retried in close()"],"exampleFix":"// before\ntag = \"Persn\"\n// after\ntag = \"Person\" // must match DESCRIBE TAG output","handlingStrategy":"validation","validationCode":"// preflight schema + connectivity\n// USE my_space; DESCRIBE TAG my_tag;   -- tag/properties exist\n// nc -zv <graphd-host> 9669            -- reachable","typeGuard":null,"tryCatchPattern":"try {\n    writer.write(row); // may throw on buffer-full flush\n} catch (IOException e) {\n    if (e.getMessage().contains(\"will not retry this batch during close\")) {\n        LOG.error(\"Batch of {} vertices dropped-failed; restart from checkpoint\", bufferSize, e.getCause());\n    }\n    throw e;\n}","preventionTips":["Validate tag schema against the cluster before deploying","Tune batch size below Nebula statement/data limits","Monitor session lifetime vs. job duration","Recover from checkpoints after this error — failed batches are not retried in close()"],"tags":["nebulagraph","write-failed","flush","batch"],"backgroundTag":"database-write-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}