apache/seatunnel · warning

Failed to close io manager in paimon sink writer.

Error message

Failed to close io manager in paimon sink writer.

What it means

During PaimonSinkWriter.close(), after closing the catalog, ioManager.close() may throw. The writer swallows the exception and logs a warning because the io manager's resources are usually already reclaimed during task shutdown; failure here does not fail the checkpoint/job.

Solutions

  1. Usually safe to ignore — this is cleanup-time noise during task shutdown.
  2. If persistent, check the io temp directory permissions/cleanup in the worker's working dir.
  3. Ensure close() is only invoked once by the runtime (avoid custom double-close in wrapped code).
  4. Upgrade SeaTunnel/Paimon plugin version if it's a known double-close bug.
Defensive patterns

Strategy: try-catch

Try / catch

try { ioManager.close(); } catch (Exception e) { log.warn("io manager close ignored during shutdown", e); }

Prevention

When it happens

Trigger: ioManager.close() throws (wrapped IOException from Paimon/FLINK-style IOManager cleanup) while closing the writer after task end or during failure recovery triggered via schema evolution branch handling.

Common situations: Task directory already deleted by the framework before writer close; double close after a prior exception path; disk permissions issues on the io temp directories.

Understand the failure class

Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSinkWriter.java:351

    }

    @Override
    public void abortPrepare() {}

    @Override
    public void close() throws IOException {
        try {
            tableWriteClose(this.tableWrite);
        } finally {
            committables.clear();
            paimonBucketAssignerFactory.clear(paimonTablePath, taskIndex);
            if (Objects.nonNull(paimonCatalog)) {
                paimonCatalog.close();
            }
            try {
                ioManager.close();
            } catch (Exception e) {
                log.warn("Failed to close io manager in paimon sink writer.", e);
            }
        }
    }

    private void tableWriteClose(TableWrite tableWrite) {
        if (Objects.nonNull(tableWrite)) {
            try {
                tableWrite.close();
            } catch (Exception e) {
                log.error("Failed to close table writer in paimon sink writer.", e);
                throw new SeaTunnelException(e);
            }
        }
    }

    @VisibleForTesting
    public boolean waitCompaction() {
        if (JobMode.BATCH.equals(jobContext.getJobMode())) {

View on GitHub (pinned to cf67b549a7)