KAFKA-20361 : Fix LazyDownConversionRecordsTest in using zlib-ng#21881
Open
muralibasani wants to merge 1 commit intoapache:3.9from
Open
KAFKA-20361 : Fix LazyDownConversionRecordsTest in using zlib-ng#21881muralibasani wants to merge 1 commit intoapache:3.9from
muralibasani wants to merge 1 commit intoapache:3.9from
Conversation
Contributor
Author
|
@chia7712 tried with this fix on the class to avoid those individual batch truncation. |
abd5cf1 to
30bb463
Compare
Contributor
Author
|
@chia7712 I see build fails with spotless error, for unrelated change. Tried fixing in this pr. |
Member
|
@muralibasani would you mind opening a separate PR to fix it? |
Member
|
@muralibasani mind rebasing to pull in #21893 ? |
Made-with: Cursor
30bb463 to
869d503
Compare
Contributor
Author
@chia7712 it's rebased now. |
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.
The test's write loop passed bytesToConvert - written as the remaining parameter to LazyDownConversionRecordsSend.writeTo(). This shrinks with each batch written, and the last batch gets truncated via Math.min(batchSize, remaining) when total V1 size exceeds V2 size — which happens with zlib-ng due to its longer match sizes compressing V1 format less efficiently.
Fix: pass bytesToConvert (constant) as remaining so no individual batch is ever truncated, regardless of the compression library used.