He-Pin commented on PR #3019: URL: https://github.com/apache/pekko/pull/3019#issuecomment-4586974288
@pjfanning good point on wanting an escape hatch, but I think we already have one a level up: the GraphStage engine is opt-in and `tls.engine = "legacy-actor"` is the full fallback — it routes through the mature `TLSActor` and never touches this heap-buffer path at all. So if the new approach causes trouble in production, that config already flips users back to the old behaviour. A buffer-level toggle on top of that would be a second opt-in inside an opt-in, and it'd mean carrying both buffer paths (heap + pooled-direct) around with the test matrix that implies. The heap choice here also isn't really a 50/50 trade-off: for the JDK `SSLEngine` a direct buffer just adds a redundant direct↔heap copy (same reason Netty's `SslHandler` uses heap buffers for its JDK engine type), so the direct path we'd be keeping around is the slower one — and it never reaches the socket anyway, since `cipherOut` hands a heap `ByteString` to the TCP stage which does its own direct-buffer pooling for the actual I/O. If you have a specific failure mode in mind that `legacy-actor` wouldn't cover, I'm happy to add the knob — otherwise I'd lean towards keeping it simple. -- 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]
