He-Pin opened a new pull request, #1155:
URL: https://github.com/apache/pekko-http/pull/1155

   ### Motivation
   Backport of #1154 to the 1.4.x branch.
   
   On the byte-string transformer, `finished` was set before the pending final 
emission was delivered. If downstream cancelled in that window, `postStop` 
skipped `cleanup`, leaking transformer resources.
   
   ### Modification
   Cherry-pick of commit 18796ca69492bcb84b98b52005161fe18c4a055c from `main`:
   
   - Treat `cleanup` as the stage finalizer by invoking it unconditionally from 
`postStop`.
   - Drop the fragile `finished` flag.
   - Add directional tests for normal completion and for cancellation while the 
final emission is pending.
   
   Existing compressor cleanup is idempotent, so the unconditional call is safe.
   
   ### Result
   All stage termination paths release transformer resources on 1.4.x without 
relying on a fragile `finished` flag.
   
   ### Tests
   - Delegated to CI for the 1.4.x branch (mirrors validation already done on 
`main` in #1154).
   - On `main`: `sbt "http-core / Test / testOnly 
org.apache.pekko.http.impl.util.StreamUtilsSpec"` (7 passed), `sbt "http-tests 
/ Test / testOnly org.apache.pekko.http.scaladsl.coding.DeflateSpec 
org.apache.pekko.http.scaladsl.coding.GzipSpec"` (54 passed), `sbt 
checkCodeStyle`, `sbt headerCreateAll`/`+headerCheckAll`, and `scalafmt --list 
--mode diff-ref=origin/main` all passed.
   
   ### References
   - Backport of #1154
   - Refs #1133; follow-up to #1142


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to