Skip to content

[Bug] Final spill flush failure leaves the output channel open #11363

Open

Description

@zhangyue19921010

Search before asking

  • I searched the issues and found no report of the same final-flush channel leak.

Paimon version

2.2-SNAPSHOT, commit a743f96.

Compute Engine

Core Java spill path, JDK 11. Reachable from primary-key write-buffer spilling and ordinary append clustering.

Minimal reproduce step

Create a ChannelWriterOutputView with LZ4 compression and a real BufferFileWriterImpl channel. Buffer a value, then make the final block write fail when close() flushes it. A failing getSize() has the same cleanup problem.

ChannelWriterOutputViewTest injects these failures into a writer backed by a real temporary FileChannel. It also forces the failure through BinaryExternalSortBuffer.flushMemory while its caller-owned IOManager remains open.

What doesn't meet your expectations?

The write/size exception escapes before writer.close(), leaving the physical channel open. closeAndDelete() then rejects deletion of that open channel and replaces the original failure. The sorter can retry the failing close before it reaches deletion.

The output channel should close even when its final flush or size lookup fails, preserving the first exception and attaching a distinct close failure as suppressed.

Anything else?

This is a final output-flush cleanup failure. It is separate from #7664's caller-owned IOManager directory lifetime and #10977's lookup merge-reader reset. The fault injection does not simulate an operating-system disk-full event, and it does not close the shared IOManager.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions