[core] Support spill-compression none in channel views - #10276
Open
LuciferYang wants to merge 1 commit into
Open
LuciferYang wants to merge 1 commit into
LuciferYang wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
spill-compressionis a free-form string option (defaultzstd, no value validation), andnoneis an intended "no compression" value:BlockCompressionFactory.createreturnsnullfor it. On master that null factory is dereferenced in theChannelWriterOutputViewconstructor (getCompressor()) and, on read-back, inChannelReaderInputView(getDecompressor()), so settingspill-compression = nonecrashes any disk spill (external sort/merge, orExternalBufferunder memory pressure) with aNullPointerException.This makes both channel views write and read plain uncompressed blocks when the compression factory is null, so
noneproduces an uncompressed spill that round-trips correctly. The compressed paths (zstd, lz4, and the rest) are unchanged.This closes #10275.
Tests
ChannelWriterOutputViewTest#testSpillCompressionNoneRoundTrippins that a spill written and read back with compressionnoneround-trips. Without the fix the write-view constructor throwsNullPointerException.API and Format
No.
Documentation
No.