Skip to content

[core] Support spill-compression none in channel views - #10276

Open
LuciferYang wants to merge 1 commit into
apache:masterfrom
LuciferYang:m/core-099-spill-none
Open

LuciferYang wants to merge 1 commit into
apache:masterfrom
LuciferYang:m/core-099-spill-none

Conversation

@LuciferYang

Copy link
Copy Markdown
Contributor

Purpose

spill-compression is a free-form string option (default zstd, no value validation), and none is an intended "no compression" value: BlockCompressionFactory.create returns null for it. On master that null factory is dereferenced in the ChannelWriterOutputView constructor (getCompressor()) and, on read-back, in ChannelReaderInputView (getDecompressor()), so setting spill-compression = none crashes any disk spill (external sort/merge, or ExternalBuffer under memory pressure) with a NullPointerException.

This makes both channel views write and read plain uncompressed blocks when the compression factory is null, so none produces an uncompressed spill that round-trips correctly. The compressed paths (zstd, lz4, and the rest) are unchanged.

This closes #10275.

Tests

  • ChannelWriterOutputViewTest#testSpillCompressionNoneRoundTrip pins that a spill written and read back with compression none round-trips. Without the fix the write-view constructor throws NullPointerException.

API and Format

No.

Documentation

No.

BlockCompressionFactory maps the 'none' compression to a null factory,
and the channel writer/reader views dereferenced it unconditionally:
with spill-compression=none the first spill crashed with an NPE in the
writer constructor, and reads likewise.

Treat the null factory as plain uncompressed blocks on both sides.

Assisted-by: GLM-5.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spill-compression=none crashes with NullPointerException on disk spill

1 participant