rschmitt commented on PR #513:
URL: 
https://github.com/apache/httpcomponents-core/pull/513#issuecomment-4725740690

   This change appears to have been incorrect. CXF was hanging due to [not 
signaling the availability of more 
data](https://github.com/apache/cxf/blob/f1b2c37bd9f3606cf7ca2d5d39cc1168e94fd9e4/rt/transports/http-hc5/src/main/java/org/apache/cxf/transport/http/asyncclient/hc5/CXFHttpAsyncRequestProducer.java#L97)
 when `SSLIOSession#write` signaled backpressure 
[here](https://github.com/apache/cxf/blob/main/rt/transports/http-hc5/src/main/java/org/apache/cxf/transport/http/asyncclient/hc5/CXFHttpAsyncRequestProducer.java#L75).
 The return value here (ultimately, `SSLEngineResult#bytesConsumed`) is simply 
being discarded.
   
   This PR appears to have introduced dysfunctional backpressure handling into 
`SSLIOSession` by simply expanding the buffer as much as necessary to hold the 
encrypted `src`. I've seen pretty convincing evidence from another team that 
this was the root cause of a significant regression in heap usage and latency 
that cropped up in httpcore 5.3.4 and has never been fixed. Finally, when I 
checked out this commit and reverted the `SSLIOSession` changes, all the tests 
passed. I'm not sure this was ever a bug in anything except CXF.


-- 
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