ensure end is called on inflaters and deflaters (1.4 branch)#1150
Merged
Conversation
* Initial plan * Apply remaining changes * Update GzipSpec.scala * Update GzipCompressor.scala --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…pCompressor (apache#1142) * Ensure deflater/inflater end() is called in DeflateCompressor and GzipCompressor - DeflateCompressor: add deflaterEnded flag + idempotent endDeflater() method; call endDeflater() in finishWithBuffer() instead of deflater.end() directly - GzipDecompressor: add postStop() calling inflater.end() + add createInflater() factory method for testability - StreamUtils.byteStringTransformer: add optional cleanup callback, call it in postStop() when the stage is stopped before onUpstreamFinish() - Encoder.singleUseEncoderFlow: pass cleanup callback that calls endDeflater() on DeflateCompressor instances to handle stream cancellation/failure - DeflateSpec: add tests for deflater cleanup on normal finish and cancellation - GzipSpec: add tests for inflater cleanup on normal finish and cancellation, and deflater cleanup on normal finish and cancellation * compile issues * Add explicit cleanup() to Compressor/DeflateCompressor; GzipCompressor inherits it * revert GzipCompressor changes * Update GzipSpec.scala * Update GzipSpec.scala * Update GzipSpec.scala * review comments * Refactor onUpstreamFinish method for clarity --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
He-Pin
approved these changes
Jul 10, 2026
Member
Author
|
There are broken tests in GzipSpec. I'll need to investigate them. It be an issue with the merge as these tests work ok in main branch. There is a possibility that they are flaky on main branch - I have seen some evidence of some flakiness but they are 3 tests that are reliably failing with this branch. |
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.
cherry picks
a06ad57 #1134
7591e2e #1142