apache/seatunnel · error · TablestoreConnectorException
FLUSH_DATA_FAILED
FLUSH_DATA_FAILED
Error message
Writing items to Tablestore failed.
What it means
Re-thrown wrapper for a previously captured asynchronous flush failure in TableStoreSinkClient. The writer defers the original failure (flushException) and raises it via checkFlushException() on subsequent write/flush calls so the pipeline fails deterministically after a background write error.
Solutions
- Read the cause (flushException) attached to this exception to find the original write failure.
- Verify Tablestore endpoint/credentials (AccessKeyId/Secret) and network connectivity from the worker nodes.
- Add retry/batch tuning to reduce throttling; check Tablestore monitoring for 5xx/throttle errors during the job window.
- Restart the job after fixing the root cause; this error always accompanies an earlier failure.
Example fix
// before
TablestoreConnectorException e = ...; // only sees generic message
// after
Throwable root = e.getCause(); // inspect original flush failure
log.error("Original flush failure", root); Defensive patterns
Strategy: try-catch
Validate before calling
// Check reachability before job start
try (Socket s = new Socket(host, 443)) { /* endpoint reachable */ } Try / catch
try {
sinkWriter.flush();
} catch (TablestoreConnectorException e) {
Throwable root = e.getCause(); // original flush failure
log.error("Flush failed, root cause: {}", root == null ? "none" : root.toString(), e);
throw e;
} Prevention
- Always inspect getCause() — the real failure is in the wrapped flushException
- Pre-validate endpoint, AccessKeyId/Secret before submitting the job
- Enable Tablestore-side monitoring/alerts for throttling and 5xx
- Avoid swallowing earlier write exceptions that seed flushException
When it happens
Trigger: A prior write/flush attempt recorded flushException (e.g. from an async callback failure), and a later call to write() or flush() invokes checkFlushException() which sees it is non-null.
Common situations: Network partitions to Tablestore endpoint; credential expiry mid-job; throttling during bursts; the original root cause is in the wrapped flushException cause, not this message.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/fbf3ddd8d30839f3.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-tablestore/src/main/java/org/apache/seatunnel/connectors/seatunnel/tablestore/sink/TableStoreSinkClient.java:101
return;
}
BatchWriteRowRequest batchWriteRowRequest = new BatchWriteRowRequest();
batchList.forEach(batchWriteRowRequest::addRowChange);
BatchWriteRowResponse response = syncClient.batchWriteRow(batchWriteRowRequest);
if (!response.isAllSucceed()) {
throw new TablestoreConnectorException(
TablestoreConnectorErrorCode.WRITE_ROW_FAILED,
String.format(
"Failed to send these rows of data: '%s'.", response.getFailedRows()));
}
batchList.clear();
}
private void checkFlushException() {
if (flushException != null) {
throw new TablestoreConnectorException(
CommonErrorCodeDeprecated.FLUSH_DATA_FAILED,
"Writing items to Tablestore failed.",
flushException);
}
}
}
View on GitHub (pinned to cf67b549a7)